Upgrade to telepath 0.75.0 for custom object support

This commit is contained in:
Nathan Sobo
2013-12-16 19:03:10 -07:00
parent bd3cfda2bb
commit 3db9e16637
10 changed files with 18 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
{Document, Model} = require 'telepath'
{TelepathicObject, Model} = require 'telepath'
# Public: Manages the deserializers used for serialized state
#
@@ -30,7 +30,7 @@ class DeserializerManager
if deserializer = @get(state)
stateVersion = state.get?('version') ? state.version
return if deserializer.version? and deserializer.version isnt stateVersion
if (state instanceof Document) and not deserializer.acceptsDocuments
if (state instanceof TelepathicObject) and not deserializer.acceptsDocuments
state = state.toObject()
deserializer.deserialize(state, params)
else