TWITTER - 2015 - Uncaught TypeError: Cannot set property '[object Array]' of undefined widgets.js:1


Uncaught TypeError: Cannot set property ‘[object Array]’ of undefined

AS per using the exact twitter widget directly from your site, its broken.
this error occurs in FF, CH, IE, iPod, iPad, and so on.

I am a developer, this is a problem with widgets.js
I have tested this on a blank page with nothing other than the embedded widget you offer.
is broken.


I have the same error on my two other pages.

The widget stopped working a few days ago. Before that everything was working ok.


When does this error occur? On initialization?

Also, if you could share a url to a page where the problem is occurring (even if the page is no longer using widgets.js), that’d be a huge help.


any way to send a private reply?


Ya know, I’m not sure. I think I may know what’s causing your problem though. Can you load the page that’s exhibiting the issue, open up the JavaScript console, enter ‘Array.prototype.reduce’, and let me know what the output is? My hunch is that your page is loading an old version of prototype.js which overrides Array.prototype.reduce with an implementation that is not ES5 compatible. See this thread for more details.


I have enter Array.prototype.reduce on JavaScript console

In response I got:
framework.pack.js:361 function (){return this.length>1?this:this[0]

what does it mean ? How can I fix it ?

I have added to my page
< script src=“”>
But it doesn’t help

I have check my time-table

Tweety @grzegorzjastrz

on both and it doesn’t work:

Embedded Timeline with Prototype

Embedded Timeline with Prototype


So that implementation of Array.prototype.reduce is not ES5 compatible and that breaks expectations widgets.js has. To fix the problem, you’ll need to figure out why prototype.js is getting loaded and upgrade it to a newer version. Based on your output, it seems prototype.js@1.6 is getting bundled into framework.pack.js.