change regexp (#8126)

This commit is contained in:
Santy-Wang
2021-01-12 17:12:06 +08:00
committed by GitHub
parent 1c2ae0231e
commit eafe2a6fd7
+1 -1
View File
@@ -50,7 +50,7 @@ interface IDownloadRequest {
handler: DownloadHandler;
}
const REGEX = /^\w+:\/\/.*/;
const REGEX = /^(?:\w+:\/\/|\.+\/).+/;
const downloadImage = (url: string, options: IDownloadParseOptions, onComplete: CompleteCallback) => {
// if createImageBitmap is valid, we can transform blob to ImageBitmap. Otherwise, just use HTMLImageElement to load