Skip to content

Commit d44969a

Browse files
committed
Ensure instanceof works after babel ES5 compilation
1 parent 5992774 commit d44969a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/legacy/legacy-data-mixin.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
constructor(message) {
2020
super(message);
2121
this.name = this.constructor.name;
22+
// Affordances for ensuring instanceof works after babel ES5 compilation
23+
this.constructor = UndefinedArgumentError;
24+
this.__proto__ = UndefinedArgumentError.prototype;
2225
}
2326
};
2427

0 commit comments

Comments
 (0)