Add RegExp check to allow class extension
Co-Authored-By: Joel Einbinder <joel.einbinder@gmail.com>
This commit is contained in:
parent
49da4cc4f6
commit
cccdd52751
|
|
@ -99,7 +99,7 @@ class Helper {
|
|||
}
|
||||
|
||||
static isRegExp(obj: any): obj is RegExp {
|
||||
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
||||
return obj instanceof RegExp || Object.prototype.toString.call(obj) === '[object RegExp]';
|
||||
}
|
||||
|
||||
static async waitForEvent(
|
||||
|
|
|
|||
Loading…
Reference in a new issue