{"action":"opened","issue":{"url":"https://api.github.com/repos/andywer/threadpool-js/issues/6","labels_url":"https://api.github.com/repos/andywer/threadpool-js/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/andywer/threadpool-js/issues/6/comments","events_url":"https://api.github.com/repos/andywer/threadpool-js/issues/6/events","html_url":"https://github.com/andywer/threadpool-js/issues/6","id":55001382,"number":6,"title":"importScripts.length","user":{"login":"kander","id":521275,"avatar_url":"https://avatars.githubusercontent.com/u/521275?v=3","gravatar_id":"","url":"https://api.github.com/users/kander","html_url":"https://github.com/kander","followers_url":"https://api.github.com/users/kander/followers","following_url":"https://api.github.com/users/kander/following{/other_user}","gists_url":"https://api.github.com/users/kander/gists{/gist_id}","starred_url":"https://api.github.com/users/kander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kander/subscriptions","organizations_url":"https://api.github.com/users/kander/orgs","repos_url":"https://api.github.com/users/kander/repos","events_url":"https://api.github.com/users/kander/events{/privacy}","received_events_url":"https://api.github.com/users/kander/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-21T10:26:58Z","updated_at":"2015-01-21T10:26:58Z","closed_at":null,"body":"Hi And - I'm reviewing the code of the JS threadpool, and came across a statement in the source that has me puzzled. Not really an issue, more of a question. It's about line 21 in the genericWorkerCode, specifically:\r\n\r\nif (importScripts && importScripts.length > 0) {\r\n   importScripts.apply(null, scripts);\r\n}\r\n\r\nI can understand the check for importScript, but why the length check? It feels to me like you might have intended to check the length of \"scripts\" instead, to ensure that there's actually something to apply to the importScripts function?\r\n\r\nKeep in mind that I'm not really a javascript superstar, just trying to demystify your ThreadPool for myself :)"}}