Skip to content

Commit c69ae33

Browse files
marc2332DogeDark
authored andcommitted
fix: Store the Clipboard context signal in the root scope (#55)
* fix: Store the Clipboard context signal in the root scope * Update use_clipboard.rs * chore: Clean up
1 parent 809d904 commit c69ae33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sdk/src/clipboard/use_clipboard.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ pub fn use_clipboard() -> UseClipboard {
6161
let clipboard = match try_consume_context() {
6262
Some(rt) => rt,
6363
None => {
64-
let clipboard = ClipboardContext::new().ok();
65-
provide_root_context(Signal::new(clipboard))
64+
let clipboard_signal =
65+
Signal::new_in_scope(ClipboardContext::new().ok(), ScopeId::ROOT);
66+
provide_root_context(clipboard_signal)
6667
}
6768
};
6869
UseClipboard { clipboard }

0 commit comments

Comments
 (0)