diff --git a/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts b/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts index 25edeb3459..b7bbfedf74 100644 --- a/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts @@ -29,18 +29,18 @@ export class RemixDefinitionProvider implements monaco.languages.DefinitionProvi } } } - if (!jumpLocation || !jumpLocation.fileName) { - return [] + if (jumpLocation && jumpLocation.fileName) { + return [{ + uri: this.monaco.Uri.parse(jumpLocation.fileName), + range: { + startLineNumber: jumpLocation.startLineNumber, + startColumn: jumpLocation.startColumn, + endLineNumber: jumpLocation.endLineNumber, + endColumn: jumpLocation.endColumn + } + }] } - return [{ - uri: this.monaco.Uri.parse(jumpLocation.fileName), - range: { - startLineNumber: jumpLocation.startLineNumber, - startColumn: jumpLocation.startColumn, - endLineNumber: jumpLocation.endLineNumber, - endColumn: jumpLocation.endColumn - } - }] + return [] } async jumpToDefinition(position: any) {