Skip to content

Commit 74af14b

Browse files
committed
Fixed JSON parsing when passing an empty state string from a deep link.
1 parent 4792dbc commit 74af14b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/index.template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ SOFTWARE.
147147
ServerModel.getPatternByID(id).then(function (data) {
148148
ExpressionModel.setLastSave(data);
149149
var pattern = $.parsePattern(data.pattern);
150-
_this.docView.setState(JSON.parse(data.state));
150+
_this.docView.setState(data.state != null && data.state != ""?JSON.parse(data.state):{});
151151
_this.docView.populateAll(pattern.ex, pattern.flags, data.content, data.replace);
152152
}, function () {
153153
BrowserHistory.go();

0 commit comments

Comments
 (0)