Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated logic to check for string value #665

Merged
merged 1 commit into from
Jan 9, 2024
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
1 change: 1 addition & 0 deletions how-to/workspace-platform-starter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
- Added sharing for pages moved into module
- Added sharing for workspaces moved into module
- Added example dummy share server for testing locally (stores in memory), to use update manifest.fin.json `https://workspace.openfin.co` references to `http://localhost:8080`
- Fixed Interop Broker client registration helper logic to ensure that a connectionUrl has a value. Empty strings were resulting in native apps being identified as supporting FDC3 2.0 instead of interop.

## v15

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
ApiMetadata
} from "../../shapes/interopbroker-shapes";
import type { Logger } from "../../shapes/logger-shapes";
import { isEmpty } from "../../utils";
import { isEmpty, isStringValue } from "../../utils";

/**
* Used to track client interactions with a broker.
Expand Down Expand Up @@ -192,7 +192,7 @@ export class ClientRegistrationHelper {
const payloadApiVersion = payload?.apiVersion;
if (!isEmpty(payloadApiVersion) && !isEmpty(payloadApiVersion?.type)) {
apiVersion = payloadApiVersion;
} else if (!isEmpty(id.connectionUrl)) {
} else if (isStringValue(id.connectionUrl)) {
// if they haven't specified apiVersion meta data and it is external and has a url then we will assume fdc3 2.0
apiVersion = { type: "fdc3", version: "2.0" };
} else {
Expand Down
Loading