Skip to content

Commit 43f51fa

Browse files
authored
Merge pull request #332 from proj4js/NaN-on-failed-conversion
Do not fail on null transformedArray
2 parents 305e885 + 8b09271 commit 43f51fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var wgs84 = proj('WGS84');
55
function transformer(from, to, coords) {
66
var transformedArray, out, keys;
77
if (Array.isArray(coords)) {
8-
transformedArray = transform(from, to, coords);
8+
transformedArray = transform(from, to, coords) || {x: NaN, y: NaN};
99
if (coords.length > 2) {
1010
if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {
1111
if (typeof transformedArray.z === 'number') {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy