diff --git a/components/Brush.vue b/components/Brush.vue index 8eb6669..bbef1d9 100644 --- a/components/Brush.vue +++ b/components/Brush.vue @@ -7,7 +7,9 @@ export default { mounted() { - this.p5Instance = new p5(this.sketch, this.$refs.canvasContainer); + if (process.client) { + this.p5Instance = new p5(this.sketch, this.$refs.canvasContainer); + } }, beforeDestroy() { if (this.p5Instance) {