Skip to content

Commit

Permalink
Fixup - should probably check if jQuery is even a thing
Browse files Browse the repository at this point in the history
  • Loading branch information
xori committed Mar 24, 2015
1 parent 4abb9e8 commit b16be87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rivets.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Rivets =
# returns a Rivets.View instance.
init: (component, el, data = {}) ->
el ?= document.createElement 'div'
el = if el instanceof jQuery then el[0]
el = if window['jQuery'] or window['$'] and el instanceof jQuery then el[0]
component = Rivets.public.components[component]
el.innerHTML = component.template.call @, el
scope = component.initialize.call @, el, data
Expand Down

0 comments on commit b16be87

Please sign in to comment.