1
1
mirror of https://github.com/ariya/phantomjs.git synced 2024-09-11 04:46:09 +03:00

Update sleepsort.js

https://github.com/ariya/phantomjs/pull/12344
This commit is contained in:
Artem 2014-06-27 13:18:00 +06:00 committed by Ariya Hidayat
parent a6f6130767
commit 5e018bd650

View File

@ -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();
});
}
}