Skip to content

Commit 3669eb9

Browse files
committed
remove errorCallback call if option is not known
1 parent fd8777e commit 3669eb9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/lib/utils/options/options.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ export class Options extends ChildableComponent<Application, OptionsComponent> {
133133
setValue(name: string|OptionDeclaration, value: any, errorCallback?: Function) {
134134
const declaration = name instanceof OptionDeclaration ? name : this.getDeclaration(<string> name);
135135
if (!declaration) {
136-
if (errorCallback) {
137-
errorCallback('Unknown option `%s`.', name.toString());
138-
}
139136
return;
140137
}
141138

@@ -155,7 +152,7 @@ export class Options extends ChildableComponent<Application, OptionsComponent> {
155152
if (!Array.isArray(value) && typeof value === 'object' && !shouldValueBeAnObject) {
156153
this.setValues(value, prefix + key + '.', errorCallback);
157154
} else {
158-
this.setValue(prefix + key, value);
155+
this.setValue(prefix + key, value, errorCallback);
159156
}
160157
}
161158
}

0 commit comments

Comments
 (0)