Skip to content

Commit

Permalink
Warn instead of error on duplicate worker source
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Thakker committed Aug 24, 2016
1 parent f2a3c9d commit f4a1a8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/source/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function Worker(self) {
this.workerSources = {};

this.self.registerWorkerSource = function (name, WorkerSource) {
if (this.workerSourceTypes[name]) {
throw new Error('Worker source with name "' + name + '" already registered.');
if (this.workerSources[name]) {
util.warnOnce('Worker source named "' + name + '" already registered.');
}
this.workerSourceTypes[name] = WorkerSource;
}.bind(this);
Expand Down

0 comments on commit f4a1a8d

Please sign in to comment.