Closed joefutrelle closed 7 years ago
Here's the full stacktrace
Uncaught RangeError: Maximum call stack size exceeded
at Array.sort (native)
at getTargetsInCategory (http://oneeyedjack.whoi.edu/static/javascript/utils.js:192:10)
at reloadTargets (http://oneeyedjack.whoi.edu/static/javascript/classify.js:126:20)
at moveToNextView (http://oneeyedjack.whoi.edu/static/javascript/hotkeys.js:102:3)
at moveToNextView (http://oneeyedjack.whoi.edu/static/javascript/hotkeys.js:104:4)
at moveToNextView (http://oneeyedjack.whoi.edu/static/javascript/hotkeys.js:104:4)
at moveToNextView (http://oneeyedjack.whoi.edu/static/javascript/hotkeys.js:104:4)
at moveToNextView (http://oneeyedjack.whoi.edu/static/javascript/hotkeys.js:104:4)
at moveToNextView (http://oneeyedjack.whoi.edu/static/javascript/hotkeys.js:104:4)
at moveToNextView (http://oneeyedjack.whoi.edu/static/javascript/hotkeys.js:104:4)
I'm on my laptop and not well-equipped to make an update and commit, but the solution is simple. Somehow a return;
got removed from static/javascript/hotkeys.js.
See line 96 at the link below and add a return to that else block that's empty for no apparent reason.
oops
I think I accidentally lost it when I reworked that function a while back, not you. I guess I hadn't tested against any empty bins since then.
To reproduce:
Then there will be a pause where the app is frozen, followed by a "maximum stack size exceeded" in the js console, on the fn
moveToNextView
inhotkeys.js
(which calls itself)Tested in Firefox and Chrome