Skip to content

Commit 2c34bde

Browse files
committed
small fix
1 parent 77fcfe0 commit 2c34bde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/react/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ export function useActionEffect(configId: string, effect: () => void) {
254254
*/
255255
export function usePluginStyle(): PluginStyle | undefined {
256256
const client = usePlugin();
257-
const [style, setStyle] = useState<PluginStyle | undefined>(undefined);
257+
const [style, setStyle] = useState<PluginStyle | undefined>();
258258

259259
useEffect(() => {
260260
// Request initial style data on mount and subscribe to updates
261-
void client.style.getStyle().then(setStyle);
261+
void client.style.getStyle().then(response => setStyle(response));
262262
return client.style.subscribeToStyle(setStyle);
263263
}, [client]);
264264

0 commit comments

Comments
 (0)