Skip to content

Commit cf93b28

Browse files
committed
fix: e2e error
1 parent bfab275 commit cf93b28

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.fatherrc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ export default defineConfig({
1212
},
1313
},
1414
sourcemap: true,
15-
targets: legacy ? { ie: 11 } /* ES2015 */ : { chrome: 80 } /* ES2020 */,
15+
targets: legacy ? /* ES2015 */ { ie: 11 } : /* ES2020 */ { chrome: 80 },
1616
});

src/enum-item.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ export class EnumItemClass<
6767
return content;
6868
}
6969
private _readonlyPropMsg(name: string) {
70-
return `Cannot modify property "${name}" on EnumItem. EnumItem instances are readonly and should not be mutated.`;
70+
// Must use this array form, otherwise the legacy mode will break the e2e test cases after compilation
71+
return [
72+
'Cannot modify property',
73+
name,
74+
'on EnumItem. EnumItem instances are readonly and should not be mutated.',
75+
].join(' ');
7176
}
7277
private _localizedProxy = new Proxy(this, {
7378
get: (target, prop) => {

0 commit comments

Comments
 (0)