Browse Source

Rearrange

James Kingsley 5 years ago
parent
commit
fe002ee145
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/index.js

+ 2 - 2
src/index.js

@@ -17,11 +17,11 @@ const Spruce = {
         await domReady()
 
         this.emit('init')
-
-        document.addEventListener('turbolinks:render', this.attach)
         
         this.attach()
 
+        document.addEventListener('turbolinks:render', this.attach)
+
         this.stores = createObservable(this.stores, {
             set: (target, key, value, oldValue) => {
                 this.events.runWatchers(this.stores, target, key, oldValue)