Skip to content

Problem with initializing idleTimer with no arguments #32

Description

@angeltam

When I start the timer and call getLastActiveTime function, getLastActiveTime returns false.
$( document ).idleTimer();
var time = $( document ).idleTimer("getLastActiveTime");

Tracing through the code, it looks like firstParam is undefined. So line 250 skipped over because undefined === null is false, and ends up returning false at line 255.

My current workaround is to call idleTimer(null). In which case, lastActiveTime correctly returns the last active time.
$( document ).idleTimer(null);
var time = $( document ).idleTimer("getLastActiveTime");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions