diff --git a/crates/prettier/src/prettier_server.js b/crates/prettier/src/prettier_server.js index 191431da0b..bf62e538dd 100644 --- a/crates/prettier/src/prettier_server.js +++ b/crates/prettier/src/prettier_server.js @@ -153,7 +153,10 @@ async function handleMessage(message, prettier) { const { method, id, params } = message; if (method === undefined) { throw new Error(`Message method is undefined: ${JSON.stringify(message)}`); + } else if (method == "initialized") { + return; } + if (id === undefined) { throw new Error(`Message id is undefined: ${JSON.stringify(message)}`); }