Permalink
Browse files

Fix issue #43 (Cannot call method 'splice')

Some <script /> can be without 'src' attribute.
  • Loading branch information...
1 parent 16afd5a commit 169eb737a8e47fa5e06ec2a75051cf6c1018f80e @LoicMahieu LoicMahieu committed Aug 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/client/vogue-client.js
@@ -230,7 +230,7 @@
scripts = document.getElementsByTagName("script");
for (var i=0; i < scripts.length; i++) {
src = scripts[i].getAttribute("src");
- if (src.slice(-15) === 'vogue-client.js') break;
+ if (src && src.slice(-15) === 'vogue-client.js') break;
}
rootUrl = src.match(/^https?\:\/\/(.*?)\//)[0];
// There is an optional base argument, that can be used.

0 comments on commit 169eb73

Please sign in to comment.