From 63ebed437b835e06f1e483391644be7cc569593e Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 27 Apr 2016 12:22:43 +0200 Subject: [PATCH 1/2] Don't use the string constructor --- src/ol/source/imagewmssource.js | 2 +- src/ol/source/tilewmssource.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/source/imagewmssource.js b/src/ol/source/imagewmssource.js index c950798036..44a5690deb 100644 --- a/src/ol/source/imagewmssource.js +++ b/src/ol/source/imagewmssource.js @@ -275,7 +275,7 @@ ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio, params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode(); if (!('STYLES' in this.params_)) { - params['STYLES'] = new String(''); + params['STYLES'] = ''; } if (pixelRatio != 1) { diff --git a/src/ol/source/tilewmssource.js b/src/ol/source/tilewmssource.js index 6ed1864c59..4bdf2b2c63 100644 --- a/src/ol/source/tilewmssource.js +++ b/src/ol/source/tilewmssource.js @@ -234,7 +234,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileE params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode(); if (!('STYLES' in this.params_)) { - params['STYLES'] = new String(''); + params['STYLES'] = ''; } if (pixelRatio != 1) { From 6002d4c3e83102119dc310605df2934b86c23128 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 27 Apr 2016 12:24:01 +0200 Subject: [PATCH 2/2] Remove duplicate type in type annotation --- src/ol/xml.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/xml.js b/src/ol/xml.js index c4556fdf84..9d16765c52 100644 --- a/src/ol/xml.js +++ b/src/ol/xml.js @@ -64,9 +64,9 @@ ol.xml.getAllTextContent = function(node, normalizeWhitespace) { * @param {Node} node Node. * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line * breaks. - * @param {Array.} accumulator Accumulator. + * @param {Array.} accumulator Accumulator. * @private - * @return {Array.} Accumulator. + * @return {Array.} Accumulator. */ ol.xml.getAllTextContent_ = function(node, normalizeWhitespace, accumulator) { if (node.nodeType == goog.dom.NodeType.CDATA_SECTION ||