This commit is contained in:
David Rowe 2017-09-14 12:20:33 +12:00
parent 6d42e82711
commit 8e25ccac79
2 changed files with 8 additions and 3 deletions

View file

@ -107,6 +107,11 @@ if (typeof Object.merge !== "function") {
Object.merge = function (objectA, objectB) {
var a = JSON.stringify(objectA),
b = JSON.stringify(objectB);
if (a === "{}") {
return JSON.parse(b); // Always return a new object.
} else if (b === "{}") {
return JSON.parse(a); // ""
}
return JSON.parse(a.slice(0, -1) + "," + b.slice(1));
};
}

View file

@ -71,7 +71,7 @@
button,
DOMAIN_CHANGED_MESSAGE = "Toolbar-DomainChanged",
DEBUG = false;
DEBUG = true;
// Utilities
Script.include("./utilities/utilities.js");
@ -1544,7 +1544,7 @@
case "undoAction":
if (History.hasUndo()) {
Feedback.play(dominantHand, Feedback.UNDO_ACTION)
Feedback.play(dominantHand, Feedback.UNDO_ACTION);
History.undo();
} else {
Feedback.play(dominantHand, Feedback.GENERAL_ERROR);
@ -1552,7 +1552,7 @@
break;
case "redoAction":
if (History.hasRedo()) {
Feedback.play(dominantHand, Feedback.REDO_ACTION)
Feedback.play(dominantHand, Feedback.REDO_ACTION);
History.redo();
} else {
Feedback.play(dominantHand, Feedback.GENERAL_ERROR);