Skip to content

Commit 0f5c315

Browse files
committed
Fixed a bug that was introduced in the last commit that would stop any from happening\! Must have been a long day\!
1 parent 1c429a3 commit 0f5c315

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/wraith.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ Wraith.prototype.config = function(config) {
5757
self.urls = fs.readFileSync(config.spider, 'utf8').split('\n');
5858
}
5959

60+
for(var domain in config.domains) {
61+
self.domains.push(config.domains[domain].replace(/\/+$/, ''));
62+
self.domainLabels.push(config.domains[domain].replace(/.*?:\/\//g, ''));
63+
}
64+
6065
if(self.urls.length === 0 || self.domains.length === 0) {
6166
log.error('No url(s) provided');
6267
process.exit(1);
6368
return false;
6469
}
6570

66-
for(var domain in config.domains) {
67-
self.domains.push(config.domains[domain].replace(/\/+$/, ''));
68-
self.domainLabels.push(config.domains[domain].replace(/.*?:\/\//g, ''));
69-
}
70-
7171
for(var url in self.urls) {
7272
var folder = path.join(self.outputFolder, self.urls[url].substring(1).replace(/\/+$/,'') + '/');
7373
self.dirs.push(folder);

0 commit comments

Comments
 (0)