adobe-webplatform / eve

Custom events…
http://dmitry.baranovskiy.com/eve/
Apache License 2.0
316 stars 111 forks source link

ReferenceError: assignment to undeclared variable eve #32

Open yetAnotherGithubber opened 7 years ago

yetAnotherGithubber commented 7 years ago

In strict mode the script causes a ReferenceError: assignment to undeclared variable eve when the eve function is assigned to the (undeclared) eve variable. This is a relatively new issue, caused by the declaration of variables being terminated after the "isArray" function.

It was not present in version 0.4.2, when the list was only terminated after the (then named) functioneve declaration.

Fix seems to be as simple as changing the semicolon in line 52 to a comma:

        isArray = Array.isArray || function (ar) {
            return ar instanceof Array || objtos.call(ar) == "[object Array]";
        }, //<---
        eve = function (name, scope) {

https://github.com/adobe-webplatform/eve/blob/master/eve.js#L52 https://github.com/adobe-webplatform/eve/blob/master/eve.js#L65

rohitkr commented 7 years ago

Having the same issue.