Skip to content

Not a function errors... fn() not a valid function on non-jQuery? #143

@dovy

Description

@dovy

@justincy @jimmyz

I've been scratching my head for a while on this. Finally found a stack-trace for this. In my environment I am using Angular w/o any jQuery. In my compressed file, you can see the stack trace here:
https://cloudup.com/cYEL-fFQe9O
Here's an expanded code block:

            f.prototype.setTimer = function(a, b, c) {
                return c && this.settings.clearTimeout(c),
                this.settings.setTimeout(function() {
                    a()
                }
                , b)
            }
            ,
            f.prototype.setAccessTokenInactiveTimer = function(a) {
                this.accessTokenInactiveTimer = this.setTimer(this.settings.eraseAccessToken, a, this.accessTokenInactiveTimer)
            }

It appears seems that fn() doesn't exist at the time it runs.

It correlates to this line of code:

Helpers.prototype.setTimer = function(fn, delay, oldTimer) {
if (oldTimer) {
clearTimeout(oldTimer);
}
setTimeout(function() {
fn();
}, delay);
};

Any ideas? I literally have thousands of these bug reports for this little line. It doesn't affect anything per say, but it may be the reason that chrome sessions don't always expire gracefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions