Skip to content

Commit

Permalink
Merge pull request #3031 from Nicetouchco/fix/syntax-highlighting
Browse files Browse the repository at this point in the history
[v9] Fix syntax highlighting
  • Loading branch information
krispya authored Oct 5, 2023
2 parents c5694ee + 4d59d9c commit 1ff2e32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/fiber/src/core/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ export function calculateDpr(dpr: Dpr): number {
/**
* Returns instance root state
*/
export const getRootState = <T = THREE.Object3D,>(obj: T): RootState | undefined =>
(obj as Instance<T>['object']).__r3f?.root.getState()
export function getRootState<T extends THREE.Object3D = THREE.Object3D>(obj: T) {
return (obj as Instance<T>['object']).__r3f?.root.getState()
}

export interface EquConfig {
/** Compare arrays by reference equality a === b (default), or by shallow equality */
Expand Down

0 comments on commit 1ff2e32

Please sign in to comment.