We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
<script module>
1 parent d994971 commit 399ad6aCopy full SHA for 399ad6a
packages/language-server/src/lib/documents/utils.ts
@@ -143,8 +143,12 @@ export function extractScriptTags(
143
return null;
144
}
145
146
- const script = scripts.find((s) => s.attributes['context'] !== 'module');
147
- const moduleScript = scripts.find((s) => s.attributes['context'] === 'module');
+ const script = scripts.find(
+ (s) => s.attributes['context'] !== 'module' && !('module' in s.attributes)
148
+ );
149
+ const moduleScript = scripts.find(
150
+ (s) => s.attributes['context'] === 'module' || 'module' in s.attributes
151
152
return { script, moduleScript };
153
154
0 commit comments