Commit 31dca0db authored by Alex Beregszaszi's avatar Alex Beregszaszi

Editor: stop earlier if not loading from storage

parent d88035e5
...@@ -175,10 +175,13 @@ function Editor (doNotLoadStorage, storage) { ...@@ -175,10 +175,13 @@ function Editor (doNotLoadStorage, storage) {
editor.commands.bindKeys({ 'ctrl-t': null }) editor.commands.bindKeys({ 'ctrl-t': null })
editor.commands.bindKeys({ 'ctrl-f': null }) editor.commands.bindKeys({ 'ctrl-f': null })
if (doNotLoadStorage) {
return
}
var files = getFiles() var files = getFiles()
if (files.length === 0) { if (files.length === 0) {
if (doNotLoadStorage) return
files.push(examples.ballot.name) files.push(examples.ballot.name)
storage.set(examples.ballot.name, examples.ballot.content) storage.set(examples.ballot.name, examples.ballot.content)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment