From 54f62a4cba079ac09152c4b57adec441308e6798 Mon Sep 17 00:00:00 2001 From: Preet Shihn Date: Fri, 5 Jun 2020 22:58:59 -0700 Subject: [PATCH] clone config at init --- src/rough-notation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rough-notation.ts b/src/rough-notation.ts index 4e30210..36f7949 100644 --- a/src/rough-notation.ts +++ b/src/rough-notation.ts @@ -18,7 +18,7 @@ class RoughAnnotationImpl implements RoughAnnotation { constructor(e: HTMLElement, config: RoughAnnotationConfig) { this._e = e; - this._config = config; + this._config = JSON.parse(JSON.stringify(config)); this.attach(); }