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

Setting type "toggle" doesn't work properly in the first time #76

Open
1 task done
conql opened this issue Jul 2, 2023 · 0 comments
Open
1 task done

Setting type "toggle" doesn't work properly in the first time #76

conql opened this issue Jul 2, 2023 · 0 comments
Labels
bug Something isn't working use issue when using `anse.app`

Comments

@conql
Copy link

conql commented Jul 2, 2023

What operating system are you using?

Windows, Android

What browser are you using?

Edge

Describe the bug

I create a custom provider with a setting type "toggle" as following:

      {
        key: 'browsing',
        name: 'Browsing',
        description: '是否联网',
        type: 'toggle',
        default: false,
      },

It causes errors when it's the first time trying to modify this setting. It then blocks the setting panel and users cannot modify other settings properly.

However, when the modification is saved and the page is reloaded, this error is gone.

What provider are you using?

Others (Specify in description)

What prompt did you enter?

No response

Console Logs

web.5717ee6e.js:1  Uncaught TypeError: Cannot destructure property 'checked' of 'n' as it is undefined.
    at Jt (SettingsSidebar.b58c0e0a.js:7:14076)
    at dispatchChangeEvent (SettingsSidebar.b58c0e0a.js:7:38715)
    at kt.executeActions (chunk-LAWKLQEP.ebe166cb.js:1:15679)
    at kt.performTransitionEffects (chunk-LAWKLQEP.ebe166cb.js:1:17642)
    at kt.performStateChangeEffects (chunk-LAWKLQEP.ebe166cb.js:1:17801)
    at kt.transition (chunk-LAWKLQEP.ebe166cb.js:1:18658)
    at chunk-LAWKLQEP.ebe166cb.js:1:18213
    at Object.setChecked (SettingsSidebar.b58c0e0a.js:7:36426)
    at SettingsSidebar.b58c0e0a.js:7:39078
    at web.5717ee6e.js:1:3136

Participation

  • I am willing to submit a pull request for this issue.
@conql conql added the use issue when using `anse.app` label Jul 2, 2023
@ddiu8081 ddiu8081 added the bug Something isn't working label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working use issue when using `anse.app`
Projects
None yet
Development

No branches or pull requests

2 participants