@react-three/fiber 8.5.0 → 8.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 8.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 87821d9: fix: null-check instance.children on reconstruct
8
+
3
9
  ## 8.5.0
4
10
 
5
11
  ### Minor Changes
@@ -1045,11 +1045,13 @@ function createRenderer(_roots, _getEventPriority) {
1045
1045
  // When args change the instance has to be re-constructed, which then
1046
1046
  // forces r3f to re-parent the children and non-scene objects
1047
1047
 
1048
- for (const child of instance.children) {
1049
- if (child.__r3f) appendChild(newInstance, child);
1050
- }
1048
+ if (instance.children) {
1049
+ for (const child of instance.children) {
1050
+ if (child.__r3f) appendChild(newInstance, child);
1051
+ }
1051
1052
 
1052
- instance.children = instance.children.filter(child => !child.__r3f);
1053
+ instance.children = instance.children.filter(child => !child.__r3f);
1054
+ }
1053
1055
 
1054
1056
  instance.__r3f.objects.forEach(child => appendChild(newInstance, child));
1055
1057
 
@@ -1045,11 +1045,13 @@ function createRenderer(_roots, _getEventPriority) {
1045
1045
  // When args change the instance has to be re-constructed, which then
1046
1046
  // forces r3f to re-parent the children and non-scene objects
1047
1047
 
1048
- for (const child of instance.children) {
1049
- if (child.__r3f) appendChild(newInstance, child);
1050
- }
1048
+ if (instance.children) {
1049
+ for (const child of instance.children) {
1050
+ if (child.__r3f) appendChild(newInstance, child);
1051
+ }
1051
1052
 
1052
- instance.children = instance.children.filter(child => !child.__r3f);
1053
+ instance.children = instance.children.filter(child => !child.__r3f);
1054
+ }
1053
1055
 
1054
1056
  instance.__r3f.objects.forEach(child => appendChild(newInstance, child));
1055
1057
 
@@ -1018,11 +1018,13 @@ function createRenderer(_roots, _getEventPriority) {
1018
1018
  // When args change the instance has to be re-constructed, which then
1019
1019
  // forces r3f to re-parent the children and non-scene objects
1020
1020
 
1021
- for (const child of instance.children) {
1022
- if (child.__r3f) appendChild(newInstance, child);
1023
- }
1021
+ if (instance.children) {
1022
+ for (const child of instance.children) {
1023
+ if (child.__r3f) appendChild(newInstance, child);
1024
+ }
1024
1025
 
1025
- instance.children = instance.children.filter(child => !child.__r3f);
1026
+ instance.children = instance.children.filter(child => !child.__r3f);
1027
+ }
1026
1028
 
1027
1029
  instance.__r3f.objects.forEach(child => appendChild(newInstance, child));
1028
1030
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-2bf2b90e.cjs.dev.js');
5
+ var index = require('./index-08c4a2bb.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-aea5c5ce.cjs.prod.js');
5
+ var index = require('./index-8826c241.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-ea463076.esm.js';
2
- export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, c as createEvents, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-ea463076.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-cf0284c7.esm.js';
2
+ export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, c as createEvents, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-cf0284c7.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-2bf2b90e.cjs.dev.js');
5
+ var index = require('../../dist/index-08c4a2bb.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-aea5c5ce.cjs.prod.js');
5
+ var index = require('../../dist/index-8826c241.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-ea463076.esm.js';
2
- export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-ea463076.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-cf0284c7.esm.js';
2
+ export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-cf0284c7.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "8.5.0",
3
+ "version": "8.5.1",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",