- Notifications
You must be signed in to change notification settings - Fork3
fix: canvas preview panic in Xcode resolved#82
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix: canvas preview panic in Xcode resolved#82
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Change-Id: I8d6a19063a13f772dc409bc5e523e1af9c109beeSigned-off-by: Thomas Kosiewski <tk@coder.com>
@@ -25,6 +25,7 @@ class AppState: ObservableObject { | |||
// Stored in Keychain | |||
@Published private(set) var sessionToken: String? { | |||
didSet { | |||
guard persistent else { return } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is already guarded inkeychainSet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Oh yes, it would have been wise of me to check that. 😅
I will keep it in for consistency with the setters above and below, as it appeared somewhat odd. This also ensures that we are doubly safe.
ThomasK33 commentedFeb 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
3a520d5
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
The preview was panicking because the app state had an optional base URL, which is getting unwrapped elsewhere. This creates an app state and then 'logs in' to set the base URL, reenabling the preview.
Change-Id: I8d6a19063a13f772dc409bc5e523e1af9c109bee
Signed-off-by: Thomas Kosiewskitk@coder.com