summaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
authorWilson Page <wilsonpage@me.com>2015-03-17 11:04:46 +0000
committerWilson Page <wilsonpage@me.com>2015-03-17 11:04:46 +0000
commit758ac8f6f0d3e87f5b03f0f8d52b29f09852272c (patch)
tree42cdf13bcca72883d8b9fed462265020c06964c7 /index.js
parentd0059f17ec9583a1fd0f6a35dc49e723b3f46ebe (diff)
downloadfastdom-origin/issue54.zip
fastdom-origin/issue54.tar.gz
fastdom-origin/issue54.tar.bz2
Should be allowed to pass and id as a string or a number to .clear()origin/issue54
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/index.js b/index.js
index 4609a51..e91cc9c 100644
--- a/index.js
+++ b/index.js
@@ -143,7 +143,7 @@
* Clears a scheduled 'read',
* 'write' or 'defer' job.
*
- * @param {Number} id
+ * @param {Number|String} id
* @public
*/
FastDom.prototype.clear = function(id) {
@@ -153,6 +153,9 @@
return this.clearFrame(id);
}
+ // Allow ids to be passed as strings
+ id = Number(id);
+
var job = this.batch.hash[id];
if (!job) return;