Skip to content

Commit

Permalink
Fixed object path for getMenuState()
Browse files Browse the repository at this point in the history
  • Loading branch information
tarjeieo committed Aug 2, 2023
1 parent a46ff45 commit efe17a6
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ export const CreateParentDialog: FC = () => {

async function getNavigationNodes(): Promise<IMenuNode[]> {
try {
// TODO: v3 of @pnp/sp does not support getMenuState()
// const menuState = await context.props.sp.web.navigation.getMenuState()
// return menuState.Nodes
return await Promise.resolve([])
const menuState = await context.props.sp.navigation.getMenuState()
return menuState.Nodes
} catch (error) {
throw error
}
Expand Down

0 comments on commit efe17a6

Please sign in to comment.