From 38a08560c90e68b879db6b114680b995d0d31d2a Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 24 Jun 2016 17:03:52 -0400 Subject: [PATCH] Fix import statement for sexagesimal --- js/lib/id/index.js | 8 ++++---- js/lib/id/ui/core.js | 4 ++-- modules/ui/core/feature_list.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/lib/id/index.js b/js/lib/id/index.js index 980e7a973..21f9acb05 100644 --- a/js/lib/id/index.js +++ b/js/lib/id/index.js @@ -1,8 +1,8 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.iD = global.iD || {}))); -}(this, function (exports) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sexagesimal')) : + typeof define === 'function' && define.amd ? define(['exports', 'sexagesimal'], factory) : + (factory((global.iD = global.iD || {}),global.sexagesimal)); +}(this, function (exports,sexagesimal) { 'use strict'; function AddEntity(way) { return function(graph) { diff --git a/js/lib/id/ui/core.js b/js/lib/id/ui/core.js index 237e4ee9a..e45ceffad 100644 --- a/js/lib/id/ui/core.js +++ b/js/lib/id/ui/core.js @@ -3216,7 +3216,7 @@ } }); - var sexagesimal = (index && typeof index === 'object' && 'default' in index ? index['default'] : index); + var pair = index.pair; function FeatureList(context) { var geocodeResults; @@ -3294,7 +3294,7 @@ }); } - var locationMatch = sexagesimal.pair(q.toUpperCase()) || q.match(/^(-?\d+\.?\d*)\s+(-?\d+\.?\d*)$/); + var locationMatch = pair(q.toUpperCase()) || q.match(/^(-?\d+\.?\d*)\s+(-?\d+\.?\d*)$/); if (locationMatch) { var loc = [parseFloat(locationMatch[0]), parseFloat(locationMatch[1])]; diff --git a/modules/ui/core/feature_list.js b/modules/ui/core/feature_list.js index 92559cf90..ecc393e9d 100644 --- a/modules/ui/core/feature_list.js +++ b/modules/ui/core/feature_list.js @@ -1,4 +1,4 @@ -import { default as sexagesimal } from 'sexagesimal'; +import * as sexagesimal from 'sexagesimal'; export function FeatureList(context) { var geocodeResults;