From 7b7ebb86091f7874a71ec560e6625a86709fb50c Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 12 Dec 2013 13:00:17 +0100 Subject: [PATCH] Add missing "new"s in ol.structs.RBush --- src/ol/structs/rbush.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/structs/rbush.js b/src/ol/structs/rbush.js index e0bdc81819..3be4c3a03b 100644 --- a/src/ol/structs/rbush.js +++ b/src/ol/structs/rbush.js @@ -537,7 +537,7 @@ ol.structs.RBush.prototype.getKey_ = function(value) { */ ol.structs.RBush.prototype.insert = function(extent, value) { if (goog.DEBUG && this.readers_) { - throw Error('cannot insert value while reading'); + throw new Error('cannot insert value while reading'); } var key = this.getKey_(value); goog.asserts.assert(!this.valueExtent_.hasOwnProperty(key)); @@ -587,7 +587,7 @@ ol.structs.RBush.prototype.isEmpty = function() { */ ol.structs.RBush.prototype.remove = function(value) { if (goog.DEBUG && this.readers_) { - throw Error('cannot remove value while reading'); + throw new Error('cannot remove value while reading'); } var key = this.getKey_(value); goog.asserts.assert(this.valueExtent_.hasOwnProperty(key)); @@ -685,7 +685,7 @@ ol.structs.RBush.prototype.splitRoot_ = function(node1, node2) { */ ol.structs.RBush.prototype.update = function(extent, value) { if (goog.DEBUG && this.readers_) { - throw Error('cannot update value while reading'); + throw new Error('cannot update value while reading'); } var key = this.getKey_(value); var currentExtent = this.valueExtent_[key];