hamt icon indicating copy to clipboard operation
hamt copied to clipboard

Maximum call stack size exceeded

Open ifozest opened this issue 5 years ago • 1 comments

RangeError: Maximum call stack size exceeded

var hamt = require("hamt")


var map = hamt.empty

map = map.set(3947110700580, {});
map = map.set(4861938734628, {});

runkit link with stacktrace https://runkit.com/ifozest/5c94a4ff57f9d100115f3089

ifozest avatar Mar 22 '19 09:03 ifozest

Are these numbers (3947110700580 and 4861938734628 ) supposed to be the keys or the raw hash value? set normally takes the keys as strings, so you may weird results like this if you try passing in a numbers directly. I think you either want to convert these numbers to strings, or use the .setHash method instead

mattbierner avatar Mar 22 '19 19:03 mattbierner