title: uncaught typeError cannot read property 'attributes' of undefined visual composer
body: <p>I have some visual composer issues.
  Cant get support due to old versions. Customer wont pay.
  Issue is that i cant add element in the backend. 
  Error in chrome debug: </p>
  
  <p>I have tried to fix the issue with the code:
  Uncaught TypeError: Cannot read property 'attributes' of undefined</p>
  
  <pre><code>&lt;pre&gt;
  html2element    @   composer-view.js?ver=4.7.4:156
  render          @   composer-view.js?ver=4.7.4:163
  addShortcode    @   composer-view.js?ver=4.7.4:232
  addShortcode    @   composer-view.js?ver=4.7.4:561
  _               @   load-scripts.php?c=0&amp;load[]=thickbox,hoverIntent,common,admin-bar,word-count,suggest,wp-ajax-respon…:474
  m               @   load-scripts.php?c=0&amp;load[]=thickbox,hoverIntent,common,admin-bar,word-count,suggest,wp-ajax-respon…:474
  f               @   load-scripts.php?c=0&amp;load[]=thickbox,hoverIntent,common,admin-bar,word-count,suggest,wp-ajax-respon…:474
  l.trigger       @   load-scripts.php?c=0&amp;load[]=thickbox,hoverIntent,common,admin-bar,word-count,suggest,wp-ajax-respon…:474
  ListenerHelper.triggerShortcodeEvents   @   events.js?ver=4.7.4:19
  (anonymous function)    @   composer-view.js?ver=4.7.4:977
  and alot fo load script errors
  &lt;/pre&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>html2element: function(html) {
  var $template, attributes = {},
      template = html;
  $template = $(template(this.model.toJSON()).trim()), _.each($template.get(0).attributes, function(attr) {
      attributes[attr.name] = attr.value
  }), this.$el.attr(attributes).html($template.html()), this.setContent(), this.renderContent()
  },
  </code></pre>
  
  <p>I have checked all over the web and stackoverflow, i cant find the issue for this problem. </p>