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

Initialize selectedVersion in a better way #2449

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

Conversation

Stanzilla
Copy link
Contributor

Ignore the first commit

@Stanzilla Stanzilla requested a review from mrbuds April 15, 2024 22:20
@Stanzilla Stanzilla force-pushed the stanzilla/better-default-version branch from 7f9bfe3 to eed23e3 Compare May 8, 2024 06:18
@Stanzilla
Copy link
Contributor Author

https://discord.com/channels/172440238717665280/520367706369949709/1238679720258703452

after reseting and select version, account dropdown is empty
reset with red button > restart app > ??

@Stanzilla Stanzilla force-pushed the stanzilla/better-default-version branch from eed23e3 to ba2d2c4 Compare July 2, 2024 23:49
@Stanzilla
Copy link
Contributor Author

Press reset button -> restart app -> account dropdown stays empty

[Vue warn]: Invalid prop: type check failed for prop "lastUpdate". Expected Date, got String with value "0".
at <RefreshButton is-settings-ok=true is-version-selected= {account: '', accounts: Array(0), name: ''} is-account-selected=undefined ... >
at
at

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 suggestion.

Comments skipped due to low confidence (3)

src/stores/config.ts:150

  • Add a check to ensure wowpath.versions is defined before accessing its length to avoid potential runtime errors.
if (this.wowpath.versions.length > 0) {

src/components/LandingPage.vue:104

  • The type of selectedVersion should be ref<Version | null>(null) instead of ref<Version[]>(null).
const selectedVersion = ref<Version[]>(null);

src/components/LandingPage.vue:635

  • Ensure that selectedVersion is correctly typed and initialized before accessing its properties.
v-model:value="selectedVersion.account"

@@ -11,7 +11,7 @@ export default defineComponent({
type: Array as () => Array<DropdownOption>,
default: () => [],
},
label: { type: [String, null], default: null },
label: { type: [String], default: null },
Copy link
Preview

Copilot AI Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type for 'label' should be 'String' with a default value of 'null'. The previous type '[String, null]' was incorrect.

Suggested change
label: { type: [String], default: null },
label: { type: String, default: null },

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
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.

1 participant