Ensure instanceof works after babel ES5 compilation

This commit is contained in:
Kevin Schaaf
2018-07-23 10:41:33 -07:00
parent 599277477d
commit d44969a211
+3
View File
@@ -19,6 +19,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
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;
}
};