Skip to content

Commit 4830b84

Browse files
author
Clauderic Demers
committed
Check that there is a prefix before trying to read the first character (fixes issues when testing with jsdom, clauderic#29)
1 parent f3abfcd commit 4830b84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const vendorPrefix = (function () {
2727
case 'ms':
2828
return 'ms';
2929
default:
30-
return pre[0].toUpperCase() + pre.substr(1);
30+
return (pre && pre.length) ? pre[0].toUpperCase() + pre.substr(1) : '';
3131
}
3232
})();
3333

0 commit comments

Comments
 (0)