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

the ID x"0 occurs multiple times within the collection, this will give undefined results! #468

Open
0xWDG opened this issue Sep 15, 2023 · 6 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest #Hacktoberfest Verified Verified bug
Milestone

Comments

@0xWDG
Copy link
Member

0xWDG commented Sep 15, 2023

Description

When you open a project it will throw this warning in the console, this is because somewhere a collection is created with double items.

ForEach<Array<FileItem>, String, Button<TupleView<(ModifiedContent<Image, _EnvironmentKeyWritingModifier<Optional<Color>>>, Text)>>>: the ID /Users/wesley/Documents/Aurora Editor/EditorTests/"0 occurs multiple times within the collection, this will give undefined results!
ForEach<Array<FileItem>, String, Button<TupleView<(ModifiedContent<Image, _EnvironmentKeyWritingModifier<Optional<Color>>>, Text)>>>: the ID /Users/wesley/Documents/Aurora Editor/EditorTests/"1 occurs multiple times within the collection, this will give undefined results!
ForEach<Array<FileItem>, String, Button<TupleView<(ModifiedContent<Image, _EnvironmentKeyWritingModifier<Optional<Color>>>, Text)>>>: the ID /Users/wesley/Documents/Aurora Editor/EditorTests/"71 occurs multiple times within the collection, this will give undefined results!
ForEach<Array<FileItem>, String, Button<TupleView<(ModifiedContent<Image, _EnvironmentKeyWritingModifier<Optional<Color>>>, Text)>>>: the ID /Users/wesley/Documents/Aurora Editor/EditorTests/"0 occurs multiple times within the collection, this will give undefined results!
ForEach<Array<FileItem>, String, Button<TupleView<(ModifiedContent<Image, _EnvironmentKeyWritingModifier<Optional<Color>>>, Text)>>>: the ID /Users/wesley/Documents/Aurora Editor/EditorTests/"1 occurs multiple times within the collection, this will give undefined results!
ForEach<Array<FileItem>, String, Button<TupleView<(ModifiedContent<Image, _EnvironmentKeyWritingModifier<Optional<Color>>>, Text)>>>: the ID /Users/wesley/Documents/Aurora Editor/EditorTests/"71 occurs multiple times within the collection, this will give undefined results!

To Reproduce

Open a project withmultiple files

Expected behavior

No warnings generatesd.

Version information

Aurora Editor: 1.0 (1)
Commit: da21fa5
MacOS: 14.0 (23A339)
Xcode: 15.0 (15A240d)

Additional context

No response

@0xWDG 0xWDG added bug Something isn't working good first issue Good for newcomers Verified Verified bug hacktoberfest #Hacktoberfest labels Sep 15, 2023
@0xWDG 0xWDG added this to the Version 1.0 milestone Sep 15, 2023
@Luckydhingra
Copy link

can u elobrate more about this issue

@0xWDG
Copy link
Member Author

0xWDG commented Oct 30, 2023

Hey @Luckydhingra,

When you open a project it will throw this warning in the console, this is because somewhere a collection is created with double items.

Unfortunately i have no idea which collection this is.

ps. i updated the original issue as well, since it was not that clear.

@0xWDG
Copy link
Member Author

0xWDG commented Oct 31, 2023

FYI I use this code as test case https://github.com/0xWDG/EditorTests

@MrDevel0per
Copy link

@0xWDG I'm a SwiftUI Dev who is rather used to this issue - I will work on fixing this and create a PR for it soon. It looks like something is being given an ID of 0 rather than a random ID.

@MrDevel0per
Copy link

@aurora-editor-bot please assign me

@MrDevel0per
Copy link

Found the issue. It occurs specifically on this line here:

ForEach(openedTabs, id: \.id) { id in

Working on a fix now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest #Hacktoberfest Verified Verified bug
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants