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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tomparisi
Copy link

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
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants