diff --git a/src/index.js b/src/index.js index e5e6ba2b47679c97af490f71bc5eefa467981231..a0f2c5ef892d0fed11458f44d94a6f6ec8c9f78c 100644 --- a/src/index.js +++ b/src/index.js @@ -55,7 +55,7 @@ module.exports = { AnimatedSurface: makeSurface({ View: Animated.View, GLCanvas: Animated.createAnimatedComponent(GLCanvas), - getGLCanvas: glSurface => glSurface.refs.canvas._component, + getGLCanvas: ({ refs: { canvas }}) => canvas._component || canvas.refs.node, dimensionInvariant: (value, field) => invariant( isAnimated(value) || typeof value === "number" && value > 0,