[bugfix] Utils: <is-src> data URLs should be prefixed with the data:image (#3308)

This commit is contained in:
xg4
2019-05-16 10:44:25 +08:00
committed by neverland
parent 77b0f8e6a6
commit 2148b61225
2 changed files with 2 additions and 1 deletions

View File

@@ -2,5 +2,5 @@
* Is image source
*/
export function isSrc(url: string): boolean {
return /^((blob:)?https?:)?\/\/|data:image/.test(url);
return /^(((blob:)?https?:)?\/\/|data:image)/.test(url);
}