Skip to content

Commit e6fa2b5

Browse files
committed
Remove redundant condition
1 parent ebd0447 commit e6fa2b5

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

packages/@ember/template-compiler/lib/template.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,9 @@ function buildEvaluator(options: Partial<EmberPrecompileOptions>) {
282282
let scope = options.scope?.();
283283

284284
if (!scope) {
285-
if (Object.keys(keywords).length > 0) {
286-
return (source: string) => {
287-
return new Function(RUNTIME_KEYWORDS_NAME, `return (${source})`)(keywords);
288-
};
289-
}
290-
return evaluator;
285+
return (source: string) => {
286+
return new Function(RUNTIME_KEYWORDS_NAME, `return (${source})`)(keywords);
287+
};
291288
}
292289

293290
scope = Object.assign({ [RUNTIME_KEYWORDS_NAME]: keywords }, scope);

0 commit comments

Comments
 (0)