ac-fhir-models
Advanced tools
Comparing version 5.2.1 to 5.2.2
@@ -634,3 +634,3 @@ 'use strict'; | ||
get: data => { | ||
const { latitude, longitude } = data[propName] || {}; | ||
const { latitude, longitude } = (data && data[propName]) || {}; | ||
if (isValidLat(latitude) && isValidLng(longitude)) { | ||
@@ -637,0 +637,0 @@ return `${latitude},${longitude}` |
{ | ||
"name": "ac-fhir-models", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"author": "Henrik Joreteg <henrik@anesthesiacharting.com>", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -443,3 +443,3 @@ // @ts-check | ||
get: data => { | ||
const { latitude, longitude } = data[propName] || {} | ||
const { latitude, longitude } = (data && data[propName]) || {} | ||
if (isValidLat(latitude) && isValidLng(longitude)) { | ||
@@ -446,0 +446,0 @@ return `${latitude},${longitude}` |
@@ -29,2 +29,7 @@ import test from 'tape' | ||
t.deepEqual( | ||
locationDefinition.getValues(), | ||
{}, | ||
'can tolerate getting nothing passed' | ||
) | ||
t.deepEqual( | ||
locationDefinition.create({ name: 'hi', latLng: '-34,151' }), | ||
@@ -31,0 +36,0 @@ { |
99256
3440