refactor: catch doesn't need to have a param (no-changelog) (#5614)
This commit is contained in:
committed by
GitHub
parent
9420b0fdf8
commit
4e244937c9
@@ -129,7 +129,7 @@ export default mixins(linterExtension, completerExtension, workflowHelpers).exte
|
||||
context,
|
||||
inserted_text: insertedText,
|
||||
});
|
||||
} catch (_) {}
|
||||
} catch {}
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
@@ -84,7 +84,7 @@ export const completerExtension = mixins(
|
||||
|
||||
try {
|
||||
variablesToValues = this.variablesToValues();
|
||||
} catch (_) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ export const jsonFieldCompletions = (Vue as CodeNodeEditorMixin).extend({
|
||||
|
||||
return input.main[0][0].node;
|
||||
}
|
||||
} catch (_) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
@@ -291,7 +291,7 @@ export const jsonFieldCompletions = (Vue as CodeNodeEditorMixin).extend({
|
||||
}
|
||||
|
||||
return nodePinData[itemIndex].json;
|
||||
} catch (_) {}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
const runData: IRunData | null = this.workflowsStore.getWorkflowRunData;
|
||||
@@ -309,7 +309,7 @@ export const jsonFieldCompletions = (Vue as CodeNodeEditorMixin).extend({
|
||||
}
|
||||
|
||||
return nodeRunData[0].data!.main[0]![itemIndex].json;
|
||||
} catch (_) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ export const linterExtension = (Vue as CodeNodeEditorMixin).extend({
|
||||
|
||||
// optional chaining operators currently unsupported by esprima-next
|
||||
if (['?.', ']?'].some((operator) => lineAtError.includes(operator))) return [];
|
||||
} catch (_) {
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export const linterExtension = (Vue as CodeNodeEditorMixin).extend({
|
||||
message: this.$locale.baseText('codeNodeEditor.linter.bothModes.syntaxError'),
|
||||
},
|
||||
];
|
||||
} catch (_) {
|
||||
} catch {
|
||||
/**
|
||||
* For invalid (e.g. half-written) n8n syntax, esprima errors with an off-by-one line number for the final line. In future, we should add full linting for n8n syntax before parsing JS.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user