From 5e018bd650d92074ce98a3c1501d21eb630e22f7 Mon Sep 17 00:00:00 2001 From: Artem Date: Fri, 27 Jun 2014 13:18:00 +0600 Subject: [PATCH] Update sleepsort.js https://github.com/ariya/phantomjs/pull/12344 --- examples/sleepsort.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/sleepsort.js b/examples/sleepsort.js index 6f0f9a32..024c25bd 100644 --- a/examples/sleepsort.js +++ b/examples/sleepsort.js @@ -15,11 +15,11 @@ function sleepSort(array, callback) { } } -if ( system.args < 2 ) { +if ( system.args.length < 2 ) { console.log("Usage: phantomjs sleepsort.js PUT YOUR INTEGERS HERE SEPARATED BY SPACES"); phantom.exit(1); } else { - sleepSort(Array.prototype.slice.call(system.args, 1), function() { + sleepSort(system.args.slice(1), function() { phantom.exit(); }); -} \ No newline at end of file +}