Do not call delete on frozen objects

This commit is contained in:
2018-01-30 11:04:03 -03:00
parent 8f03d38d16
commit 7ec7dab0fa
2 changed files with 3 additions and 3 deletions
@@ -59,10 +59,10 @@ window.t = (path, vars={}) ->
#replacable = undefined #replacable = undefined
if vars.scope if vars.scope
path = "#{vars.scope}.#{path}" path = "#{vars.scope}.#{path}"
delete vars.scope delete vars.scope unless Object.isFrozen(vars)
if vars.suffix if vars.suffix
path = "#{path}.#{vars.suffix}" path = "#{path}.#{vars.suffix}"
delete vars.suffix delete vars.suffix unless Object.isFrozen(vars)
locale = Qstorage.getItem('locale') || 'en' locale = Qstorage.getItem('locale') || 'en'
parts = path.split(".") parts = path.split(".")
#accessor = "$translations.#{$locale}[\"#{parts.join("\"][\"")}\"]" #accessor = "$translations.#{$locale}[\"#{parts.join("\"][\"")}\"]"
+1 -1
View File
@@ -4,7 +4,7 @@ import config from 'ember-get-config'
export default ApplicationAdapter.extend export default ApplicationAdapter.extend
urlForQueryRecord: (query) -> urlForQueryRecord: (query) ->
if query.me if query.me
delete query.me delete query.me unless Object.isFrozen(query)
return config.userMeEndpoint || "#{config.apiHost}#{config.rootURL}users/me" return config.userMeEndpoint || "#{config.apiHost}#{config.rootURL}users/me"
@_super arguments... @_super arguments...