Skip to content

Commit b9f1dac

Browse files
committed
Fix unsaved warning on startup.
1 parent 80d9c96 commit b9f1dac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dev/src/RegExr.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class RegExr extends EventDispatcher {
5252
if (state === false) {
5353
this._localInit();
5454
} else if (this.account.authenticated && !state) {
55-
this.newDoc();
55+
this.newDoc(false);
5656
} else {
5757
this.state = state;
5858
}
@@ -120,8 +120,8 @@ export default class RegExr extends EventDispatcher {
120120
this._savedHash = this.hash;
121121
}
122122

123-
newDoc() {
124-
this.load({flavor: this.flavor.value, expression: ".", text:"Text"});
123+
newDoc(warn=true) {
124+
this.load({flavor: this.flavor.value, expression: ".", text:"Text"}, warn);
125125
this.expression.selectAll();
126126
}
127127

0 commit comments

Comments
 (0)