Bug 1668342 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I'm getting an error `Uncaught TypeError: F.shift is not a function` in this function:
```js
    B.implement(Function, {
      $J_TYPE: 'function',
      jBind: function () {
        var F = w.$A(arguments),
        E = this,
        G = F.shift();
        return function () {
          return E.apply(G || null, F.concat(w.$A(arguments)))
        }
      },
``` 
This is perhaps related to this part where ` array.item` is used (I think there is an attempt to clone an array):

```js
$A: function(G) {
                if (!w.defined(G)) {
                    return w.$([])
                }
                if (G.toArray) {
                    return w.$(G.toArray())
                }
                if (G.item) {
                    var F = G.length || 0
                      , E = new Array(F);
                    while (F--) {
                        E[F] = G[F]
                    }
                    return w.$(E)
                }
                return w.$(Array.prototype.slice.call(G))
            },
```

I think this code is a part of this paid library https://www.magictoolbox.com/magic360/ Also 360 viewer examples on their website don't work in Nightly.

Tom would you be able to take a look? We perhaps can contact the library author if needed
I'm getting an error `Uncaught TypeError: F.shift is not a function` in this function:
```js
    B.implement(Function, {
      $J_TYPE: 'function',
      jBind: function () {
        var F = w.$A(arguments),
        E = this,
        G = F.shift();
        return function () {
          return E.apply(G || null, F.concat(w.$A(arguments)))
        }
      },
``` 

I think this code is a part of this paid library https://www.magictoolbox.com/magic360/ Also 360 viewer examples on their website don't work in Nightly.

Tom would you be able to take a look? We perhaps can contact the library author if needed

Back to Bug 1668342 Comment 1