[gnome-maps] Layers: Fix warnings in togeojson



commit 645db7618b4e0342f9270d5640f9b1adb516a28b
Author: Hashem Nasarat <hashem riseup net>
Date:   Mon Feb 15 00:56:58 2016 -0500

    Layers: Fix warnings in togeojson
    
    Several functions did a bare return, when for strict correctness based
    on mozilla's js engine they should return none.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757171

 src/togeojson/togeojson.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/togeojson/togeojson.js b/src/togeojson/togeojson.js
index 427ba45..ee99627 100644
--- a/src/togeojson/togeojson.js
+++ b/src/togeojson/togeojson.js
@@ -300,7 +300,7 @@ var toGeoJSON = (function() {
                     if (line.times && line.times.length) times.push(line.times);
                     if (line.heartRates && line.heartRates.length) heartRates.push(line.heartRates);
                 }
-                if (track.length === 0) return;
+                if (track.length === 0) return null;
                 var properties = getProperties(node);
                 if (times.length) properties.coordTimes = track.length === 1 ? times[0] : times;
                 if (heartRates.length) properties.heartRates = track.length === 1 ? heartRates[0] : 
heartRates;
@@ -315,7 +315,7 @@ var toGeoJSON = (function() {
             }
             function getRoute(node) {
                 var line = getPoints(node, 'rtept');
-                if (!line.line) return;
+                if (!line.line) return null;
                 var routeObj = {
                     type: 'Feature',
                     properties: getProperties(node),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]