From 1f9ffa3ec3f7ffc25551e43ef5aa7f185bc3fe41 Mon Sep 17 00:00:00 2001 From: fuzhenn Date: Tue, 4 Jul 2017 20:19:47 +0800 Subject: [PATCH] fix possible null clusters --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 577809f..ed6b8c9 100644 --- a/index.js +++ b/index.js @@ -323,6 +323,9 @@ ClusterLayer.registerRenderer('canvas', class extends maptalks.renderer.VectorLa } _drawClusters(clusters, ratio, matrix) { + if (!clusters) { + return; + } matrix = matrix ? matrix['container'] : null; this._clusterMaskExtent = this.prepareCanvas(); const map = this.getMap(),