Handle case where key on data needs Ember.set

I'm not really sure what cauese a field to be defined as such setter,
but it sometimes happens.
This commit is contained in:
Piotr Sarnacki 2012-10-27 03:50:08 +02:00
parent 63e2a9add6
commit a8e85dc714
4 changed files with 8 additions and 6 deletions

View File

@ -42,9 +42,11 @@ Travis.Store = DS.Store.extend
if clientId != undefined
if data = dataCache[clientId]
# trying to set id here fails, TODO: talk with ember core team to create merge-like function
delete hash.id
$.extend(data, hash)
for key, value of hash
if ( descriptor = Object.getOwnPropertyDescriptor(data, key) ) && descriptor.set
Ember.set(data, key, value)
else
data[key] = value
else
dataCache[clientId] = hash

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
3f6f1305
bce1e34d