修复get.is.node的bug

This commit is contained in:
shijian 2024-01-02 19:35:09 +08:00
parent d566a3d20a
commit 711ff153b2
1 changed files with 2 additions and 3 deletions

View File

@ -337,11 +337,10 @@ export class Is extends Uninstantable {
*/
/**
* @param { any } obj
* @returns { boolean }
*/
static node(obj) {
var str = Object.prototype.toString.call(obj);
if (str && str.indexOf('[object HTML')) return true;
return false;
return Object.prototype.toString.call(obj).startsWith('[object HTML');
}
/**
* @param { any } obj