Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

bug fix. ExternalViews are not deserialized correctly on client side - #1114

Open
tomparisi wants to merge 2 commits into
allegro:masterfrom
tomparisi:fix-externalview-client-deserializer
Open

bug fix. ExternalViews are not deserialized correctly on client side#1114
tomparisi wants to merge 2 commits into
allegro:masterfrom
tomparisi:fix-externalview-client-deserializer

Conversation

@tomparisi

Copy link
Copy Markdown

If I define an externalView in the configuration file and then click on the share menu the following exception is thrown

Uncaught TypeError: externalView.linkGeneratorFn is not a function
    externalViewItems share-menu.tsx:115
    externalViewItems share-menu.tsx:112
    render share-menu.tsx:142
    React 11
    unstable_runWithPriority scheduler.development.js:653
    React 21
    unstable_runWithPriority scheduler.development.js:653
    React 6
    componentDidMount sources-provider.tsx:73
    promise callback*componentDidMount sources-provider.tsx:72
    React 6
    unstable_runWithPriority scheduler.development.js:653
    React 5
    unstable_runWithPriority scheduler.development.js:653
    React 7
    tsx main.tsx:67
    Webpack 6
share-menu.tsx:115:29

This patch seems to fix the issue.

Step to reproduce:

  1. add the following lines to config-examples.yaml
externalViews:
   - title: Timezone Info
     linkGenerator: >
       { 
          return 'http://www.tickcounter.com/timezone/'; 
       }
  1. start turnilo and click on the share menu.

@tomparisi
tomparisi requested a review from a team as a code owner October 31, 2024 15:03
@adrianmroz

Copy link
Copy Markdown
Collaborator

Add a test for it and we should be good to merge the change!

@tomparisi tomparisi changed the title bug fix. ExternalViews where not deserialized correctly on client side bug fix. ExternalViews are not deserialized correctly on client side Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants