Skip to content

Commit 82e3180

Browse files
update readme
1 parent f30ff2f commit 82e3180

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,15 @@ If the initial app launch was triggered by a shortcut, it will give the id of th
218218
otherwise it will give null.
219219

220220
```javascript
221+
const id = await Shortcuts.getInitialShortcutId();
222+
223+
or
224+
221225
const callback = (id) => {
222226
console.log('Shortcut Id:', id);
223227
};
224228

225-
const id = await Shortcuts.getInitialShortcutId();
229+
Shortcuts.getInitialShortcutId().then(callback)
226230
```
227231

228232
### addOnShortcutUsedListener

0 commit comments

Comments
 (0)