Skip to content

Commit

Permalink
fix: not render in cache if there is no document
Browse files Browse the repository at this point in the history
closes #222
  • Loading branch information
sgratzl committed Mar 14, 2024
1 parent 2434d67 commit 03721bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elements/GeoFeature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
if (!feature) {
return;
}
if (!this.cache || this.cache.canvasKey !== this._optionsToKey()) {
if ((!this.cache || this.cache.canvasKey !== this._optionsToKey()) && ctx.canvas.ownerDocument != null) {
this._drawInCache(ctx.canvas.ownerDocument);
}
const bounds = this.getBounds();
Expand Down

0 comments on commit 03721bb

Please sign in to comment.