Browse Source

Store rendered element if target is a DOM element

Artur Paikin 9 years ago
parent
commit
62825e81ac
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/plugins/Plugin.js

+ 2 - 2
src/plugins/Plugin.js

@@ -49,8 +49,8 @@ export default class Plugin {
       // if (replaceTargetContent) {
       //   document.querySelector(target).innerHTML = ''
       // }
-      const element = plugin.render(this.core.state)
-      document.querySelector(target).appendChild(element)
+      this.el = plugin.render(this.core.state)
+      document.querySelector(target).appendChild(this.el)
 
       return target
     } else {