Skip to content

Commit 8ace346

Browse files
committed
add file type check
1 parent 7e41815 commit 8ace346

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/site-kit/src/lib/codemirror/autocompletionDataProvider.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ const is_bindable = (node, context) => {
577577
* @type {import("./types").Test}
578578
*/
579579
const is_props_id_call = (node, context, selected) => {
580+
if (selected.type !== 'svelte') return false;
580581
if (!is_state_call(node, context, selected)) return false;
581582
if (node.parent?.parent?.name !== 'Script') return false;
582583
return true;
@@ -586,6 +587,7 @@ const is_props_id_call = (node, context, selected) => {
586587
* @type {import("./types").Test}
587588
*/
588589
const is_props_id = (node, context, selected) => {
590+
if (selected.type !== 'svelte') return false;
589591
if (!is_state(node, context, selected)) return false;
590592
if (node.parent?.parent?.name !== 'Script') return false;
591593
return true;

0 commit comments

Comments
 (0)