diff --git a/examples/vector-labels.js b/examples/vector-labels.js index 07e09350de..220f4f973d 100644 --- a/examples/vector-labels.js +++ b/examples/vector-labels.js @@ -78,7 +78,7 @@ const getText = function(feature, resolution, dom) { text = ''; } else if (type == 'shorten') { text = text.trunc(12); - } else if (type == 'wrap' && dom.placement.value != 'line') { + } else if (type == 'wrap' && (!dom.placement || dom.placement.value != 'line')) { text = stringDivider(text, 16, '\n'); }