title: backbone.js: Right-hand side of 'instanceof' is not an object
body: <p>I'm newer with jquery and backbone, hope someone could help me with this error. I have a web application that, sometimes, throws this error in the console</p>
  
  <blockquote>
  <pre><code>require.js:900 TypeError: Right-hand side of 'instanceof' is not an object
      at child.setElement (backbone.js?__nc__=1527837925799:1040)
      at child._ensureElement (backbone.js?__nc__=1527837925799:1102)
      at child.Backbone.View (backbone.js?__nc__=1527837925799:990)
      at child [as constructor] (backbone.js?__nc__=1527837925799:1545)
      at new child (backbone.js?__nc__=1527837925799:1545)
      at child.initialize (application.js?__nc__=1527837925799:357)
      at child.Inditex.Application (backbone-inditex-1.2.0.js?__nc__=1527837925799:27)
      at new child (backbone.js?__nc__=1527837925799:1545)
      at createApp (main.js:201)
  </code></pre>
  </blockquote>
  
  <pre><code>at Object.execCb (require.js:1690)
  </code></pre>
  
  <p>If this error happens, with a reload of the webpage is fixed (sometimes with 3 or 4 times) but I can't know why this happens.</p>
  
  <p>I have found the line where this error is thrown. In backbone.js file, the method setElement</p>
  
  <blockquote>
  <pre><code>setElement: function(element, delegate) {
        debugger;
        if (this.$el) this.undelegateEvents();
        this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);
        this.el = this.$el[0];
        if (delegate !== false) this.delegateEvents();
        return this;
      },
  </code></pre>
  </blockquote>
  
  <p>sometimes, Backbone.$ is not an object and is when the error hapens.</p>
  
  <p>¿Any idea for resolving this error? I'm using backbone.js 1.1.0</p>
  
  <p>Thanks in advance</p>