shobhitsharma / embedo

Embeds third party content to DOM with perks 🧙‍♀️ (7kb gzip / standalone)
https://shobhitsharma.github.io/embedo
MIT License
348 stars 32 forks source link

TypeError while executing in phantomjs #8

Closed shobhitsharma closed 7 years ago

shobhitsharma commented 7 years ago

Stack

TypeError: undefined is not a constructor (evaluating 'n.find(function(i){return t.defaults.SOURCES[i]&&e.match(t.defaults.SOURCES[i].REGEX)?i:null})')

Cause

Running script in a headless browser plugin, either for scraping or mock test, caused this exception. Fixing buildscript while adding polyfills might solve it.