Skip to content

Commit

Permalink
fix: Function formatting destroying syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
krispya committed Oct 2, 2023
1 parent c5694ee commit 4d59d9c
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 4d59d9c

Please sign in to comment.