Remove goog.isObject not in assertions
This commit is contained in:
@@ -26,11 +26,11 @@ ol.inherits(ol.format.JSONFeature, ol.format.Feature);
|
|||||||
* @return {Object} Object.
|
* @return {Object} Object.
|
||||||
*/
|
*/
|
||||||
ol.format.JSONFeature.prototype.getObject_ = function(source) {
|
ol.format.JSONFeature.prototype.getObject_ = function(source) {
|
||||||
if (goog.isObject(source)) {
|
if (typeof source === 'string') {
|
||||||
return source;
|
|
||||||
} else if (typeof source === 'string') {
|
|
||||||
var object = JSON.parse(source);
|
var object = JSON.parse(source);
|
||||||
return object ? /** @type {Object} */ (object) : null;
|
return object ? /** @type {Object} */ (object) : null;
|
||||||
|
} else if (source !== null) {
|
||||||
|
return source;
|
||||||
} else {
|
} else {
|
||||||
goog.asserts.fail();
|
goog.asserts.fail();
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+1
-1
@@ -1486,7 +1486,7 @@ ol.Map.createOptionsInternal = function(options) {
|
|||||||
logos[logo] = '';
|
logos[logo] = '';
|
||||||
} else if (logo instanceof HTMLElement) {
|
} else if (logo instanceof HTMLElement) {
|
||||||
logos[goog.getUid(logo).toString()] = logo;
|
logos[goog.getUid(logo).toString()] = logo;
|
||||||
} else if (goog.isObject(logo)) {
|
} else if (logo !== null) {
|
||||||
goog.asserts.assertString(logo.href, 'logo.href should be a string');
|
goog.asserts.assertString(logo.href, 'logo.href should be a string');
|
||||||
goog.asserts.assertString(logo.src, 'logo.src should be a string');
|
goog.asserts.assertString(logo.src, 'logo.src should be a string');
|
||||||
logos[logo.src] = logo.href;
|
logos[logo.src] = logo.href;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ ol.renderer.Layer.prototype.updateLogos = function(frameState, source) {
|
|||||||
if (logo !== undefined) {
|
if (logo !== undefined) {
|
||||||
if (typeof logo === 'string') {
|
if (typeof logo === 'string') {
|
||||||
frameState.logos[logo] = '';
|
frameState.logos[logo] = '';
|
||||||
} else if (goog.isObject(logo)) {
|
} else if (logo !== null) {
|
||||||
goog.asserts.assertString(logo.href, 'logo.href is a string');
|
goog.asserts.assertString(logo.href, 'logo.href is a string');
|
||||||
goog.asserts.assertString(logo.src, 'logo.src is a string');
|
goog.asserts.assertString(logo.src, 'logo.src is a string');
|
||||||
frameState.logos[logo.src] = logo.href;
|
frameState.logos[logo.src] = logo.href;
|
||||||
|
|||||||
Reference in New Issue
Block a user