mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
fix: use webview.current to check valid instance
This commit is contained in:
@@ -17,7 +17,7 @@ export type Settings = {
|
||||
};
|
||||
|
||||
async function call(webview: RefObject<WebView | undefined>, action?: Action) {
|
||||
if (!webview || !action) return;
|
||||
if (!webview.current || !action) return;
|
||||
setImmediate(() => webview.current?.injectJavaScript(action.job));
|
||||
let response = await getResponse(action.id);
|
||||
console.log('webview job: ', action.id, response ? response.value : response);
|
||||
|
||||
Reference in New Issue
Block a user