aboutsummaryrefslogtreecommitdiffstats
path: root/linkHints.js
diff options
context:
space:
mode:
Diffstat (limited to 'linkHints.js')
-rw-r--r--linkHints.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/linkHints.js b/linkHints.js
index de498fbe..cbff300f 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -309,10 +309,12 @@ var linkHints = {
}
// we invoke the deactivate() function directly instead of using setTimeout(callback, 0) so that
// deactivateMode can be tested synchronously
- if (!delay)
+ if (!delay) {
deactivate();
- else
+ if (callback) callback();
+ } else {
setTimeout(function() { deactivate(); if (callback) callback(); }, delay);
+ }
},
/*