From af1ac9bdd074affd55c15727ebd8f60a4fa128e9 Mon Sep 17 00:00:00 2001 From: Trezy Date: Fri, 14 Jun 2024 13:26:47 -0500 Subject: [PATCH] fix: prevent `draw` prop from getting lumped in with Pixi props --- src/helpers/applyProps.js | 2 +- src/helpers/createInstance.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/helpers/applyProps.js b/src/helpers/applyProps.js index 095e54e5..191d1b66 100644 --- a/src/helpers/applyProps.js +++ b/src/helpers/applyProps.js @@ -119,7 +119,7 @@ export function applyProps(instance, data) localState.eventCount = Object.keys(localState.handlers).length; } - else if (key !== 'draw') + else { currentInstance[key] = value; } diff --git a/src/helpers/createInstance.js b/src/helpers/createInstance.js index c031f4d5..ea5d35f7 100644 --- a/src/helpers/createInstance.js +++ b/src/helpers/createInstance.js @@ -30,7 +30,14 @@ export function createInstance(type, props, root) } const { + // react props children, + key, + ref, + + // @pixi/react props + draw, + ...pixiProps } = props;