Skip to content

Commit

Permalink
Don't throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
vilhelmjosander committed Jun 2, 2015
1 parent 5de6263 commit 75ceb36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/js/contested-regions.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ var Regions = (function(root, undefined) {
* Extends orig obj with ext obj - shallow copy
*/
extend: function(orig, ext) {
if(typeof orig !== 'object' || typeof ext !== 'object')
throw new Error('Can only extend objects');
if(typeof orig !== 'object' || typeof ext !== 'object') {
console.log('Can only extend objects. Defaults are being used');
return;
}

for(var key in ext) {
orig[key] = ext[key];
Expand Down

0 comments on commit 75ceb36

Please sign in to comment.