You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If GM_setValue receives a single argument in produces an error message because the second argument is undefined. This is confusing if the name argument has been omitted, e.g.:
GM_setValue(GM_getValue("count", 0) + num);
The thrown error sends the debugger in the wrong direction, searching for places that undefined could creep into num.
Proposal: GM_setValue should test that arguments.length === 2 and throw an error if the assertion fails.
The text was updated successfully, but these errors were encountered:
Originally: DevjaVu ticket 44
If GM_setValue receives a single argument in produces an error message because the second argument is undefined. This is confusing if the name argument has been omitted, e.g.:
GM_setValue(GM_getValue("count", 0) + num);
The thrown error sends the debugger in the wrong direction, searching for places that undefined could creep into num.
Proposal: GM_setValue should test that arguments.length === 2 and throw an error if the assertion fails.
The text was updated successfully, but these errors were encountered: