Browse Source

docs: fix missing object to read from for listen example (#5505)

Webber Takken 2 năm trước cách đây
mục cha
commit
35264b4c18
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      tooling/api/src/event.ts

+ 1 - 1
tooling/api/src/event.ts

@@ -45,7 +45,7 @@ export enum TauriEvent {
  * ```typescript
  * import { listen } from '@tauri-apps/api/event';
  * const unlisten = await listen<string>('error', (event) => {
- *   console.log(`Got error in window ${event.windowLabel}, payload: ${payload}`);
+ *   console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);
  * });
  *
  * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted