appmeerkat / meerkat-api

7 stars 2 forks source link

Crash when building dynamically embed script #24

Open mvaullerin opened 9 years ago

mvaullerin commented 9 years ago

Hi, I'm trying to generate dynamically an iframe of meerkat player (so the script is loaded asynchronously)

Something like that :

var html = '<script src="http://meerkatapp.co/widgets/embed.js" data-username="'+$scope.username+'">';

(I'm using angularJS)

But I got this error :

Uncaught TypeError: Cannot read property 'replace' of null

on the following line :

mkBtnUsername = mkBtnUsername.replace("@", '')

Any Idea ?