1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-19 19:35:46 +01:00

Fix some mode changing corner cases. Closes issue #51.

This commit is contained in:
Kris Maglione
2010-10-06 11:38:22 -04:00
parent 3af5107388
commit 97f043d32f
3 changed files with 10 additions and 14 deletions

View File

@@ -237,7 +237,7 @@ const Dactyl = Module("dactyl", {
* @param {number} frames The number of frames to print.
*/
dumpStack: function dumpStack(msg, frames) {
let stack = Error().stack.replace(/(?:.*\n){2}/, "");
let stack = Error().stack.replace(/(?:.*\n){1}/, "");
if (frames != null)
[stack] = stack.match(RegExp("(?:.*\n){0," + frames + "}"));
dactyl.dump((msg || "Stack") + "\n" + stack + "\n");