Skip to content

Commit 1485fd1

Browse files
committed
Updated to use a matching expression instead.
Replaced the booleans with a matching expression. Now, URLs beginning with the following patterns will be ignored: - blob: - data: - http:// - https:// - // As suggested by @pnstickne.
1 parent 14632cd commit 1485fd1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/loader/Loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ Phaser.Loader.prototype = {
20282028
return false;
20292029
}
20302030

2031-
if (url.substr(0, 5) === 'data:' || url.substr(0, 4) === 'http' || url.substr(0, 2) === '//')
2031+
if (url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/))
20322032
{
20332033
return url;
20342034
}

0 commit comments

Comments
 (0)