Skip to content

[local] fix: image load error with number folder#2736

Closed
artonge wants to merge 3 commits into
masterfrom
artonge/local/2735
Closed

[local] fix: image load error with number folder#2736
artonge wants to merge 3 commits into
masterfrom
artonge/local/2735

Conversation

@artonge

@artonge artonge commented Feb 11, 2025

Copy link
Copy Markdown
Contributor

Local version of #2735 for CI

Signed-off-by: Franziska Bath <franziska.bath@strato.de>
@artonge

artonge commented Feb 11, 2025

Copy link
Copy Markdown
Contributor Author

/compile amend /

@artonge artonge requested review from skjnldsv and susnux and removed request for skjnldsv February 11, 2025 16:06
Comment thread src/utils/fileUtils.ts
Comment on lines +100 to +101
? fileInfo1[key].toString()?.localeCompare(fileInfo2[key].toString(), getLanguage(), { numeric: true })
: -fileInfo1[key].toString()?.localeCompare(fileInfo2[key].toString(), getLanguage(), { numeric: true })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure if -undefined makes sense. This is guaranteed to always be a string.

Suggested change
? fileInfo1[key].toString()?.localeCompare(fileInfo2[key].toString(), getLanguage(), { numeric: true })
: -fileInfo1[key].toString()?.localeCompare(fileInfo2[key].toString(), getLanguage(), { numeric: true })
? String(fileInfo1[key]).localeCompare(fileInfo2[key].toString(), getLanguage(), { numeric: true })
: -String(fileInfo1[key]).localeCompare(fileInfo2[key].toString(), getLanguage(), { numeric: true })

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From the original PR, it is to match nextcloud/photos#783, which makes sense to keep similar.

fracado and others added 2 commits February 12, 2025 15:50
Signed-off-by: Franziska Bath <franziska.bath@strato.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: Louis Chemineau <louis@chmn.me>
@skjnldsv skjnldsv closed this Feb 14, 2025
@skjnldsv skjnldsv deleted the artonge/local/2735 branch February 14, 2025 10:53
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.

4 participants