Skip to content

Commit

Permalink
fix(webpack): add guard around onListening call (#19363)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc authored Oct 5, 2023
1 parent fc76d6f commit 47fcce0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/webpack/src/utils/run-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export function runWebpackDevServer(
const originalOnListen = devServerConfig.onListening;

devServerConfig.onListening = function (server: any) {
originalOnListen(server);
if (typeof originalOnListen === 'function') {
originalOnListen(server);
}

const devServerOptions: WebpackDevServerConfiguration = server.options;

Expand Down

0 comments on commit 47fcce0

Please sign in to comment.