Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84117


Change subject: allow globe coordinate precision to be null in JS
......................................................................

allow globe coordinate precision to be null in JS

Change-Id: I5a169a1f8c4387da1545ac580c637e56f9297226
---
M DataValues/resources/globeCoordinate.js/src/globeCoordinate.GlobeCoordinate.js
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/17/84117/1

diff --git 
a/DataValues/resources/globeCoordinate.js/src/globeCoordinate.GlobeCoordinate.js
 
b/DataValues/resources/globeCoordinate.js/src/globeCoordinate.GlobeCoordinate.js
index ab6f358..2f4777d 100644
--- 
a/DataValues/resources/globeCoordinate.js/src/globeCoordinate.GlobeCoordinate.js
+++ 
b/DataValues/resources/globeCoordinate.js/src/globeCoordinate.GlobeCoordinate.js
@@ -19,7 +19,6 @@
         * @param {Object} gcDef Needs the following attributes:
         *                 - {number} latitude
         *                 - {number} longitude
-        *                 - {number} precision
         *
         * @constructor
         */
@@ -27,12 +26,11 @@
                if( !gcDef || typeof gcDef !== 'object'
                        || gcDef.latitude === undefined
                        || gcDef.longitude === undefined
-                       || gcDef.precision === undefined
                ) {
                        throw new Error( 'No proper globe coordinate definition 
given' );
                }
 
-               if( !isValidPrecision( gcDef.precision ) ) {
+               if( gcDef.precision && !isValidPrecision( gcDef.precision ) ) {
                        throw new Error( 'No valid precision given' );
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/84117
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a169a1f8c4387da1545ac580c637e56f9297226
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to