diff --git a/src/app/editor.js b/src/app/editor.js index 25ff193ea1..cd3cac5893 100644 --- a/src/app/editor.js +++ b/src/app/editor.js @@ -15,7 +15,7 @@ function Editor (doNotLoadStorage, storage) { var sessions = {} var sourceAnnotations = [] - setupStuff(getFiles()) + setupStuff() this.addMarker = function (range, cssClass) { return editor.session.addMarker(range, cssClass) @@ -170,7 +170,9 @@ function Editor (doNotLoadStorage, storage) { return s } - function setupStuff (files) { + function setupStuff () { + var files = getFiles() + if (files.length === 0) { if (doNotLoadStorage) return files.push(examples.ballot.name)