Skip to content

Commit

Permalink
More Specific Info on Script Loading Error (#7108)
Browse files Browse the repository at this point in the history
* add url info on script loading error message

* Update packages/next/client/page-loader.js

shorten error message for smaller bundle size

Co-Authored-By: chuck0523 <chuckinthestar@gmail.com>
  • Loading branch information
chuck0523 authored and timneutkens committed Apr 23, 2019
1 parent 4d8a9fd commit 7878347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/client/page-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class PageLoader {
script.crossOrigin = process.crossOrigin
script.src = url
script.onerror = () => {
const error = new Error(`Error when loading route: ${route}`)
const error = new Error(`Error loading script ${url}`)
error.code = 'PAGE_LOAD_ERROR'
this.pageRegisterEvents.emit(route, { error })
}
Expand Down

0 comments on commit 7878347

Please sign in to comment.