Commit 78223ba0 authored by Denton Liu's avatar Denton Liu

Changed SOL_CACHE_FILE within the callback

parent 1bd0dbb1
......@@ -28,8 +28,9 @@ function Editor (loadingFromGist, storage) {
this.uploadFile = function (file, callback) {
var fileReader = new FileReader();
SOL_CACHE_FILE = utils.fileKey(file.name);
var cacheName = utils.fileKey(file.name);
fileReader.onload = function (e) {
SOL_CACHE_FILE = cacheName;
storage.set(SOL_CACHE_FILE, e.target.result);
sessions[SOL_CACHE_FILE] = null;
callback();
......
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