Skip to content

Commit

Permalink
fix: remove optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Jun 16, 2020
1 parent 57f1556 commit e4f4005
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/runtime/src/plugins/modals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function $showModal<T = any>(
}

return new Promise((resolve) => {
const modalApp = createApp(component, options?.props)
const modalApp = createApp(component, options ? options.props : null)
let isResolved = false
const closeCallback = (data?: T) => {
if (isResolved) return
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/src/plugins/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export async function $navigateTo(
}
}

export async function $navigateBack(options: NavigationOptions) {
const frame = await waitForFrame(options?.frame)
export async function $navigateBack(options?: NavigationOptions) {
const frame = await waitForFrame(options ? options.frame : undefined)

if (!frame) {
throw new Error('Failed to resolve frame. Make sure your frame exists.')
Expand Down

0 comments on commit e4f4005

Please sign in to comment.