From 04185b03065db402d98f8281409ca998064e67f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20S=C3=B6derlund?= Date: Wed, 5 Oct 2022 19:23:21 +0200 Subject: [PATCH] Added error for uses in web environments --- src/Canvas.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Canvas.js b/src/Canvas.js index c7ffee1..c7e04f5 100644 --- a/src/Canvas.js +++ b/src/Canvas.js @@ -57,6 +57,8 @@ export default class Canvas extends Component { context2D = new CanvasRenderingContext2D(this); constructor() { + if(Platform.OS == "web") + throw new Error("This package uses react-native-webview which is not supported by web projects, refer to the actual element."); super(); this.bus.pause(); }