File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
extensions/ql-vscode/src/data-extensions-editor Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import {
1818 showAndLogExceptionWithTelemetry ,
1919} from "../helpers" ;
2020import { extLogger } from "../common" ;
21- import { outputFile , readFile } from "fs-extra" ;
21+ import { outputFile , pathExists , readFile } from "fs-extra" ;
2222import { load as loadYaml } from "js-yaml" ;
2323import { DatabaseItem , DatabaseManager } from "../local-databases" ;
2424import { CodeQLCliServer } from "../cli" ;
@@ -161,6 +161,10 @@ export class DataExtensionsEditorView extends AbstractWebview<
161161
162162 protected async loadExistingModeledMethods ( ) : Promise < void > {
163163 try {
164+ if ( ! ( await pathExists ( this . modelFilename ) ) ) {
165+ return ;
166+ }
167+
164168 const yaml = await readFile ( this . modelFilename , "utf8" ) ;
165169
166170 const data = loadYaml ( yaml , {
You can’t perform that action at this time.
0 commit comments