From 98a5908c625ba2b32fcefa0113ac3e02c3f63a97 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Sat, 15 May 2021 22:51:19 +1000 Subject: quick fix but need to investigate later --- lib/valueLimits.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/valueLimits.js') diff --git a/lib/valueLimits.js b/lib/valueLimits.js index c902883..135fa15 100644 --- a/lib/valueLimits.js +++ b/lib/valueLimits.js @@ -6,7 +6,10 @@ * @returns {boolean} */ module.exports = (feature) => { - if ('addr:flats' in feature.properties && feature.properties['addr:flats'].length > 255) { + console.log(feature) + if ('addr:flats' in feature.properties && feature.properties['addr:flats'] !== null && feature.properties['addr:flats'].length > 255) { + // TODO need to work out why nulls are appearing when using + //if ('addr:flats' in feature.properties && feature.properties['addr:flats'].length > 255) { // need to wrap const value = feature.properties['addr:flats'] for (let i = 0; i < value.length; i += 255) { -- cgit v1.2.3