Skip to content

Commit

Permalink
Ensure instanceof works after babel ES5 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jul 23, 2018
1 parent 5992774 commit d44969a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/legacy/legacy-data-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
constructor(message) {
super(message);
this.name = this.constructor.name;
// Affordances for ensuring instanceof works after babel ES5 compilation
this.constructor = UndefinedArgumentError;
this.__proto__ = UndefinedArgumentError.prototype;
}
};

Expand Down

0 comments on commit d44969a

Please sign in to comment.