Skip to content

Commit 26a9d7e

Browse files
latekvojwajgelt
authored andcommitted
fix: Fix extension crashing on startup (#1810)
Extension crashes on startup. This PR fixes that. This was happening because `workspace.getConfiguration();` (located in `getEditorType();`) was being called before `setExtensionContext(context);`. <img width="914" height="152" alt="image" src="https://github.com/user-attachments/assets/adc99ef2-7518-4b2e-9e79-925b70ca3fa6" /> ### How Has This Been Tested: - Start the extension - The panel works, and no errors are thrown
1 parent 51b4616 commit 26a9d7e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/vscode-extension/src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ export async function activate(context: ExtensionContext) {
101101
// after improper deactivation of the extension.
102102
commands.executeCommand("setContext", "RNIDE.panelIsOpen", false);
103103

104-
getTelemetryReporter().sendTelemetryEvent(`extension:activated:${getEditorType()}`);
105-
106104
context.subscriptions.push(
107105
window.registerWebviewPanelSerializer(TabPanel.viewType, new TabPanelSerializer())
108106
);
@@ -121,6 +119,7 @@ export async function activate(context: ExtensionContext) {
121119
}
122120

123121
migrateOldConfiguration();
122+
getTelemetryReporter().sendTelemetryEvent(`extension:activated:${getEditorType()}`);
124123

125124
commands.executeCommand("setContext", "RNIDE.sidePanelIsClosed", false);
126125

0 commit comments

Comments
 (0)