[gnome-maps/wip/osm-edit: 11/47] osmApi: Don't parse NULL output from the shim layer
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/osm-edit: 11/47] osmApi: Don't parse NULL output from the shim layer
- Date: Thu, 30 Apr 2015 12:58:17 +0000 (UTC)
commit b141d25940b285b32bb27771590be6de0c2c1267
Author: Marcus Lundblad <marcus lundblad primekey se>
Date: Sun Feb 1 10:09:32 2015 +0100
osmApi: Don't parse NULL output from the shim layer
src/osmConnection.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/osmConnection.js b/src/osmConnection.js
index fbda662..6710254 100644
--- a/src/osmConnection.js
+++ b/src/osmConnection.js
@@ -86,7 +86,10 @@ const OSMConnection = new Lang.Class({
print ('parsed XML to JSON: ' + jsonString);
- return JSON.parse(jsonString);
+ if (jsonString)
+ return JSON.parse(jsonString);
+ else
+ return NULL;
},
_createObject: function(type, json) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]