From 36203af88e27034a44f60bd7afe82f87a22ae30e Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Sat, 29 Jun 2019 14:47:34 +0200 Subject: [PATCH] should not rely on all deconstructing features because not all parsers support it --- src/utils/UndoManager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index d62f06dc..4a28205a 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -102,7 +102,10 @@ export class UndoManager extends Observable { * @param {Set} [trackedTransactionOrigins=new Set([null])] * @param {object} [options={captureTimeout=500}] */ - constructor (typeScope, trackedTransactionOrigins = new Set([null]), { captureTimeout = 500 } = {}) { + constructor (typeScope, trackedTransactionOrigins = new Set([null]), { captureTimeout } = {}) { + if (captureTimeout == null) { + captureTimeout = 500 + } super() this.scope = typeScope instanceof Array ? typeScope : [typeScope] trackedTransactionOrigins.add(this)