We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b03920 commit 986a3f2Copy full SHA for 986a3f2
packages/ra-core/src/inference/assertions.ts
@@ -29,7 +29,7 @@ export const isUrl = (value: any): value is string =>
29
export const valuesAreUrl = (values: any[]) => values.every(isUrl);
30
31
const ImageUrlRegexp =
32
- /http(s*):\/\/.*\.(jpeg|jpg|jfif|pjpeg|pjp|png|svg|gif|webp|apng|bmp|ico|cur|tif|tiff)/i;
+ /^http(s*):\/\/.*\.(jpeg|jpg|jfif|pjpeg|pjp|png|svg|gif|webp|apng|bmp|ico|cur|tif|tiff)/i;
33
export const isImageUrl = (value: any): value is string =>
34
!value || ImageUrlRegexp.test(value);
35
export const valuesAreImageUrl = (values: any[]) => values.every(isImageUrl);
0 commit comments