Skip to content

Commit

Permalink
fix: πŸ› get correct url when load fails (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyoung authored Dec 20, 2023
1 parent 0a4decf commit 24506f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ export default class ErrorPlugin implements PageSpyPlugin {
'error',
(evt: Event) => {
if (!(evt instanceof ErrorEvent)) {
const { target } = evt as any;
ErrorPlugin.sendMessage(
`Resource Load Error: Cannot load resource of (${
(evt.target! as any).src
`[PageSpy] Resource Load Error: Cannot load resource of (${
target.src || target.href
})`,
null,
);
Expand Down

0 comments on commit 24506f5

Please sign in to comment.