Skip to content

Commit

Permalink
fix: opitmize error message
Browse files Browse the repository at this point in the history
  • Loading branch information
skyFi authored Aug 24, 2020
1 parent 6665272 commit 50da4ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/handleAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function appendCSS(
element.addEventListener(
'error',
() => {
error(`css asset loaded error: ${asset}`);
error(`css asset loaded error: ${content || asset}`);
return resolve();
},
false,
Expand Down Expand Up @@ -113,7 +113,7 @@ export function appendExternalScript(

element.addEventListener(
'error',
() => reject(new Error(`js asset loaded error: ${asset}`)),
() => reject(new Error(`js asset loaded error: ${content || asset}`)),
false,
);
element.addEventListener('load', () => resolve(), false);
Expand Down Expand Up @@ -417,4 +417,4 @@ export function cacheAssets(cacheKey: string): void {
assetsNode.setAttribute('cache', cacheKey);
}
});
}
}

0 comments on commit 50da4ff

Please sign in to comment.