arg.js icon indicating copy to clipboard operation
arg.js copied to clipboard

Inconsistency in value returns

Open kkufieta opened this issue 7 years ago • 3 comments

I would set the hash with e.g. window.location.hash = Arg.stringify({workid: 12345});

which returns

location.href
"https://som.hex21.com/katya/version_01/#workid=12345"

But with Arg I get very inconsistent results which I can't figure out why:

Arg.all()
{"": undefined, workid: 198582}

Arg.hash()
{workid: 70761}

Arg('workid')
198582

Any ideas why?

I guess I can work with this for now:

Arg.parse(location.hash)
{workid: 12345}

kkufieta avatar Jun 07 '17 14:06 kkufieta

I'll look into that.

BTW, this library required a major code base update...

ValentinTrinque avatar Jun 07 '17 15:06 ValentinTrinque

Can you tell which version you are using ? And which browser + version ?

ValentinTrinque avatar Jun 07 '17 22:06 ValentinTrinque

I have trouble reproducing it.

ValentinTrinque avatar Jun 07 '17 23:06 ValentinTrinque