Skip to content

Commit

Permalink
Revert "Fix recycling values that are not set"
Browse files Browse the repository at this point in the history
This reverts commit 1f8da1b.
  • Loading branch information
goatslacker committed May 28, 2015
1 parent 57b24f3 commit 9bc8732
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 33 deletions.
8 changes: 4 additions & 4 deletions src/alt/utils/StateFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export function setAppState(instance, data, onStore) {
const store = instance.stores[key]
if (store) {
const { config } = store.StoreModel
const state = store[Sym.STATE_CONTAINER]
if (config.onDeserialize) obj[key] = config.onDeserialize(value) || value
fn.eachObject(k => delete state[k], [state])
fn.assign(state, obj[key])
if (config.onDeserialize) {
obj[key] = config.onDeserialize(value) || value
}
fn.assign(store[Sym.STATE_CONTAINER], obj[key])
onStore(store)
}
}, [obj])
Expand Down
29 changes: 0 additions & 29 deletions test/recycle-test.js

This file was deleted.

0 comments on commit 9bc8732

Please sign in to comment.