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

fix: tabData undefined when syncIndex #1028

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

Timeless0911
Copy link
Contributor

Summary

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Apr 26, 2024

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit 57b8e75
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/662b84e1de480e000834eaef
😎 Deploy Preview https://deploy-preview-1028--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 80 (🟢 up 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@Timeless0911
Copy link
Contributor Author

@shulaoda hi, I encoutered an issue like
image

Please help me to see if there is any problem with this fix pr.

@shulaoda
Copy link
Contributor

shulaoda commented Apr 26, 2024

hi, I encoutered an issue like

The initial value of tabData is {}, should there be no problem under normal circumstances?

Perhaps here should be {tabData:{},setTabData:()=>{}}
image

@Timeless0911
Copy link
Contributor Author

I encouter this issue in this component

@shulaoda
Copy link
Contributor

I encouter this issue in this component

Have you started running? Or is it just a TS detection error

@Timeless0911
Copy link
Contributor Author

runtime error, tabdata print out to be undefined. May be we should add some protection code.

@shulaoda
Copy link
Contributor

Perhaps here should be {tabData:{},setTabData:()=>{}}image

I think it's caused by the initial value of createContext. Can you try again after changing it?

@Timeless0911
Copy link
Contributor Author

I was eating dinner earlier hh.

There is indeed a problem with the initialization here, after changing it, it behaves right. Awesome!

@Timeless0911 Timeless0911 force-pushed the fix/tabdata-undefined-error branch from 27ad744 to 57b8e75 Compare April 26, 2024 10:41
@Timeless0911
Copy link
Contributor Author

!canary

@Timeless0911 Timeless0911 requested a review from SoonIter April 26, 2024 10:47
@Timeless0911 Timeless0911 merged commit 088e8d3 into main Apr 26, 2024
8 checks passed
@Timeless0911 Timeless0911 deleted the fix/tabdata-undefined-error branch April 26, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants