finos / FDC3-Sail

Open implementation of the FDC3 standard using Electron and an integrated App Directory.
Apache License 2.0
34 stars 26 forks source link

getCurrentChannel fails if there is no current channel #88

Closed robmoffat closed 1 year ago

robmoffat commented 2 years ago

Bug Report

Steps to Reproduce:

Run conformance test getCurrentChannel (FDC31.2)

Expected Result:

Promise of null

Actual Result:

Exception thrown;

Additional Context:

 getCurrentChannel: async () => {
      const result: ChannelData = await sendMessage(
        FDC3_1_2_TOPICS.GET_CURRENT_CHANNEL,
        {},
      );

      return createChannelObject(
        result.id,
        result.type,
        result.displayMetadata || { name: result.id },
      );
    },

in the above code from api.ts, result is null but nevertheless it tries to create a channel object.

robmoffat commented 2 years ago

I might try and fix this later if I have time.