Update evennia.js

Fix for misplaced parens-- previous code checked 'is the output of `typeof(listener === 'function')` truthy', which is equivalent of `typeof(boolean)` which is always true.
This commit is contained in:
luciensadi 2021-08-09 10:13:59 -07:00 committed by GitHub
parent 0c1d0b172b
commit 819097fdde

View file

@ -195,7 +195,7 @@ An "emitter" object must have a function
// to listen to cmdname events.
//
var on = function (cmdname, listener) {
if (typeof(listener === 'function')) {
if (typeof(listener) === 'function') {
listeners[cmdname] = listener;
};
};