Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Fix get route details call #237

Merged
merged 2 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.64.1 (2023-03-23)

- Updated incorrect function call from `getRouteInfo` to `getRouteDetails`. [#237](https://github.com/blackbaud/auth-client/pull/237)

# 2.64.0 (2023-03-23)

- Added call to `getRouteInfo` to get a route's category. [#235](https://github.com/blackbaud/auth-client/pull/235)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blackbaud/auth-client",
"version": "2.64.0",
"version": "2.64.1",
"description": "Provides methods for obtaining an authentication token from the Blackbaud authentication service.",
"main": "dist/bundles/auth-client.umd.js",
"module": "index.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/omnibar/omnibar-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface BBOmnibarConfig {

onResize?: (resizeArgs: BBOmnibarResizeArgs) => void;

getRouteInfo?: (args: { href: string; pathname: string }) => {
getRouteDetails?: (args: { href: string; pathname: string }) => {
category?: string;
};
}
2 changes: 1 addition & 1 deletion src/omnibar/omnibar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ describe('Omnibar', () => {
}

loadOmnibar({
getRouteInfo: () => {
getRouteDetails: () => {
return { category: 'test' };
},
});
Expand Down
5 changes: 4 additions & 1 deletion src/omnibar/omnibar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ function handleStateChange(): void {
const url = BBAuthInterop.getCurrentUrl();
const path = BBAuthInterop.getCurrentPath();

const routeInfo = omnibarConfig.getRouteInfo?.({ href: url, pathname: path });
const routeInfo = omnibarConfig.getRouteDetails?.({
href: url,
pathname: path,
});

BBAuthInterop.postLocationChangeMessage(iframeEl, url, routeInfo?.category);

Expand Down