Skip to content

Commit 8691470

Browse files
committed
fix #334
1 parent 1858583 commit 8691470

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

packages/core/src/fields/viewFields/JsViewFieldMountable.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ export class JsViewFieldMountable extends FieldMountable {
124124
}
125125

126126
if (!this.plugin.settings.enableJs) {
127-
throw new MetaBindJsError({
128-
errorLevel: ErrorLevel.CRITICAL,
129-
effect: "Can't evaluate expression.",
130-
cause: 'JS expressions are disabled in the plugin settings.',
131-
});
127+
this.errorCollection.add(
128+
new MetaBindJsError({
129+
errorLevel: ErrorLevel.CRITICAL,
130+
effect: "Can't evaluate expression.",
131+
cause: 'JS evaluation is disabled in the plugin settings.',
132+
}),
133+
);
132134
}
133135

134136
this.createErrorIndicator(targetEl);

packages/obsidian/src/settings/SettingsTab.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class MetaBindSettingTab extends PluginSettingTab {
6666

6767
new Setting(containerEl)
6868
.setName('Enable Syntax Highlighting')
69-
.setDesc(`Enable syntax highlighting for. RESTART REQUIRED.`)
69+
.setDesc(`Enable syntax highlighting for meta bind syntax. RESTART REQUIRED.`)
7070
.addToggle(cb => {
7171
cb.setValue(this.plugin.settings.enableSyntaxHighlighting);
7272
cb.onChange(data => {
@@ -130,9 +130,9 @@ export class MetaBindSettingTab extends PluginSettingTab {
130130
});
131131

132132
new Setting(containerEl)
133-
.setName('Enable JS Input Fields')
133+
.setName('Enable JavaScript')
134134
.setDesc(
135-
"Enable the processing of JavaScript input fields. This is potentially DANGEROUS, thus it's disabled by default. RESTART REQUIRED.",
135+
"Enable features that run user written JavaScript. This is potentially DANGEROUS, thus it's disabled by default. RESTART REQUIRED.",
136136
)
137137
.addToggle(cb => {
138138
cb.setValue(this.plugin.settings.enableJs);

0 commit comments

Comments
 (0)