I think it's because any instance of EventEmitter can execute event.prototype.init,. If an existing event executes the init method, it needs to be judged by IF


No usefulness is found in this version. the following is a wild guess .

if (!this._events ...){

}

this part may be historical legacy code, which means if it looks like a duck, swims like a duck, and sounds like a duck, then it is most likely a duck , so it is not re-instantiated. it is recommended to check the historical version and how it is used .

this._maxListeners = this._maxListeners || undefined;

if this._maxListeners is false, it becomes undefined , such as 0/NaN .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e65911-440eb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e65911-440eb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?