@@ -9,9 +9,9 @@ import type {
99} from "@/lib/types/model/callback" ;
1010import type { Input } from "@/lib/types/model/channel" ;
1111import { getInputValues } from "@/lib/actions/helpers/getInputValues" ;
12- import { getValue , type ObjPath } from "@/lib/utils/objPath" ;
12+ import { getValue , type ObjPath , toObjPath } from "@/lib/utils/objPath" ;
1313import { invokeCallbacks } from "@/lib/actions/helpers/invokeCallbacks" ;
14- import type { ContributionState } from "@/lib" ;
14+ import type { ContributionState } from "@/lib/types/state/contribution " ;
1515
1616/**
1717 * A reference to a property of an input of a callback of a contribution.
@@ -77,7 +77,7 @@ function _getHostStorePropertyRefs(): PropertyRef[] {
7777 contribIndex,
7878 callbackIndex,
7979 inputIndex,
80- propertyPath : input . property ! . split ( "." ) ,
80+ propertyPath : toObjPath ( input . property ! ) ,
8181 } ) ;
8282 }
8383 } ) ,
@@ -93,7 +93,7 @@ function hasPropertyChanged<S extends object = object>(
9393 currState : S ,
9494 prevState : S ,
9595) : boolean {
96- const currValue = propertyPath ( currState , propertyPath ) ;
97- const prevValue = propertyPath ( prevState , propertyPath ) ;
96+ const currValue = getValue ( currState , propertyPath ) ;
97+ const prevValue = getValue ( prevState , propertyPath ) ;
9898 return ! Object . is ( currValue , prevValue ) ;
9999}
0 commit comments