Skip to content

Commit bbeadfa

Browse files
committed
Fixed problem with PEG Playground when grammar or code text is empty
1 parent 57f866c commit bbeadfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Setup editros
22
const grammar = ace.edit("grammar-editor");
33
grammar.setShowPrintMargin(false);
4-
grammar.setValue(localStorage.getItem('grammarText'));
4+
grammar.setValue(localStorage.getItem('grammarText') || '');
55
grammar.moveCursorTo(0, 0);
66

77
const code = ace.edit("code-editor");
88
code.setShowPrintMargin(false);
9-
code.setValue(localStorage.getItem('codeText'));
9+
code.setValue(localStorage.getItem('codeText') || '');
1010
code.moveCursorTo(0, 0);
1111

1212
const codeAst = ace.edit("code-ast");

0 commit comments

Comments
 (0)