diff --git a/docs/index.js b/docs/index.js index efcffc4..6622316 100644 --- a/docs/index.js +++ b/docs/index.js @@ -1,12 +1,12 @@ // Setup editros const grammar = ace.edit("grammar-editor"); grammar.setShowPrintMargin(false); -grammar.setValue(localStorage.getItem('grammarText')); +grammar.setValue(localStorage.getItem('grammarText') || ''); grammar.moveCursorTo(0, 0); const code = ace.edit("code-editor"); code.setShowPrintMargin(false); -code.setValue(localStorage.getItem('codeText')); +code.setValue(localStorage.getItem('codeText') || ''); code.moveCursorTo(0, 0); const codeAst = ace.edit("code-ast");