Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ const setupRoutes = function setupRoutes() {
}
};

socket.invalid = (filePath = '<unknown>', compiler) => {
socket.invalid = (filePath, compiler) => {
if (socket.readyState === 3) {
return;
}

const context = compiler.context || compiler.options.context || process.cwd();
const fileName = filePath.replace(context, '');
const fileName = typeof filePath === 'string' ? filePath.replace(context, '') : '<unknown>';
const { wpsId } = compiler;

socket.send(prep({ action: 'invalid', data: { fileName, wpsId } }));
Expand Down