From 4c3dbae43b0e67362f097ce3b1ce4919bd5cb97e Mon Sep 17 00:00:00 2001 From: d11e9 Date: Mon, 5 Oct 2015 09:58:57 +0100 Subject: [PATCH] fix untitled naming regression --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 9eb7185c49..43d07449cd 100644 --- a/index.html +++ b/index.html @@ -91,11 +91,11 @@ THE SOFTWARE. var Range = ace.require('ace/range').Range; var errMarkerId = null; - var untitledCount = 1; + var untitledCount = ''; if (!getFiles().length || window.localStorage['sol-cache']) { - // Backwards-compatibility + // Backwards-compatibility while (window.localStorage[SOL_CACHE_UNTITLED + untitledCount]) - untitledCount++; + untitledCount = (untitledCount - 0) + 1; SOL_CACHE_FILE = SOL_CACHE_UNTITLED + untitledCount; window.localStorage[SOL_CACHE_FILE] = window.localStorage['sol-cache'] || BALLOT_EXAMPLE; window.localStorage.removeItem('sol-cache'); @@ -114,7 +114,7 @@ THE SOFTWARE. $filesEl.on('click','.newFile', function() { while (window.localStorage[SOL_CACHE_UNTITLED + untitledCount]) - untitledCount++; + untitledCount = (untitledCount - 0) + 1; SOL_CACHE_FILE = SOL_CACHE_UNTITLED + untitledCount; window.localStorage[SOL_CACHE_FILE] = ''; updateFiles();