File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export default function htmlLoader(source) {
43
43
let offset = 0 ;
44
44
for ( const link of links ) {
45
45
if (
46
+ link . value &&
46
47
isUrlRequest ( link . value , options . root ) &&
47
48
! link . value . includes ( 'mailto:' )
48
49
) {
Original file line number Diff line number Diff line change @@ -7,13 +7,14 @@ describe('loader', () => {
7
7
it ( 'should convert to requires' , ( ) => {
8
8
const result = loader . call (
9
9
{ } ,
10
- 'Text <img src="image.png"><img src="~bootstrap-img"> Text'
10
+ 'Text <img src="image.png"><img src="~bootstrap-img"> Text <img src=""> '
11
11
) ;
12
12
13
13
expect ( result ) . toBe (
14
- `${ GET_URL_CODE } module.exports = "Text <img src=\\"" + __url__(require("./image.png")) + "\\"><img src=\\"" + __url__(require("bootstrap-img")) + "\\"> Text";`
14
+ `${ GET_URL_CODE } module.exports = "Text <img src=\\"" + __url__(require("./image.png")) + "\\"><img src=\\"" + __url__(require("bootstrap-img")) + "\\"> Text <img src=\\\"\\\"> ";`
15
15
) ;
16
16
} ) ;
17
+
17
18
it ( 'should accept attrs from query' , ( ) => {
18
19
const result = loader . call (
19
20
{
You can’t perform that action at this time.
0 commit comments