Permalink
Browse files

do not rely on instanceof checks

bad things happens if several backbone versions loaded into interpreter
  • Loading branch information...
andreypopp committed Mar 23, 2013
1 parent c3e7a20 commit f35fc1a6e2f3cd211adf440b28292d2d3331de5f
Showing with 2 additions and 2 deletions.
  1. +1 −1 backbone.viewdsl.coffee
  2. +1 −1 backbone.viewdsl.js
View
@@ -404,7 +404,7 @@
return o if p.trim().length == 0
for n in p.split('.')
ctx = o
- o = if (ctx instanceof Backbone.Model)
+ o = if ctx.attributes? and ctx.get?
o = ctx.get(n)
o = ctx[n] if o == undefined
o
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit f35fc1a

Please sign in to comment.