Skip to content
Snippets Groups Projects
Commit adb31ea8 authored by Ray Schamp's avatar Ray Schamp
Browse files

Use a storage singleton

This way the instance can be reused, which allows access to non-deprecated `DataFormat` and `AssetType`.
parent ceb39f36
Branches
Tags
No related merge requests found
......@@ -26,4 +26,6 @@ class Storage extends ScratchStorage {
}
}
export default Storage;
const storage = new Storage();
export default storage;
import VM from 'scratch-vm';
import Storage from '../lib/storage';
import storage from '../lib/storage';
const SET_VM = 'scratch-gui/vm/SET_VM';
const defaultVM = new VM();
defaultVM.attachStorage(new Storage());
defaultVM.attachStorage(storage);
const initialState = defaultVM;
const reducer = function (state, action) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment