Commit fa86ae0

mo khan <mo@mokhan.ca>
2017-03-16 03:28:15
check if gon is defined.
1 parent 13d7e05
Changed files (1)
app
assets
javascripts
lib
app/assets/javascripts/lib/behaviours/autovue.js.coffee
@@ -2,8 +2,9 @@ class Stronglifters.Autovue extends Stronglifters.Behaviour
   @on "turbolinks:load"
 
   execute: ->
+    data = gon? ? gon : {}
     for element in $("[data-autovue]")
       window.views ?= []
       window.views.push new Vue
         el: element
-        data: gon
+        data: data