Skip to content

Commit 9a8dd5c

Browse files
author
James Halliday
committed
make sure the script has an src attribute before trying to split on it
1 parent a2fdc6c commit 9a8dd5c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/paypal-button.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ PAYPAL.apps = PAYPAL.apps || {};
233233

234234
for (i = 0, len = nodes.length; i < len; i++) {
235235
node = nodes[i];
236+
if (!node || !node.src) continue;
237+
236238
data = node && getDataSet(node);
237239
button = data && data.button;
238240
business = data.business = node.src.split('?merchant=')[1];

0 commit comments

Comments
 (0)