[PR #2101] [MERGED] Fix typo in fixParsedNameCase #3652

Closed
opened 2026-04-25 00:16:30 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2101
Author: @selfhost-alt
Created: 9/15/2023
Status: Merged
Merged: 9/17/2023
Merged by: @advplyr

Base: masterHead: fix-parse-full-name-typo


📝 Commits (1)

  • f7849d2 Fix typo in fixParsedNameCase

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 server/utils/parsers/parseFullName.js (+3 -3)

📄 Description

I noticed the following crash in my server:

/server/utils/parsers/parseFullName.js:73
              nameParts[j].slice(-1) !== '.' &&
                           ^

TypeError: Cannot read properties of undefined (reading 'slice')
    at fixParsedNameCase (/server/utils/parsers/parseFullName.js:73:28)
    at module.exports (/server/utils/parsers/parseFullName.js:344:16)
    at parseName (/server/utils/parsers/parseNameString.js:9:15)
    at /server/utils/parsers/parseNameString.js:81:20
    at Array.forEach (<anonymous>)
    at Object.module.exports.parse (/server/utils/parsers/parseNameString.js:80:18)
    at /server/scanner/BookScanner.js:650:54
    at Array.forEach (<anonymous>)
    at BookScanner.getBookMetadataFromScanData (/server/scanner/BookScanner.js:640:24)
    at BookScanner.rescanExistingBookLibraryItem (/server/scanner/BookScanner.js:172:37)

When I dug in, I found a suspicious use of nameParts where it didn't really make sense in that context. When I clicked through to the code where this util was copied from, I found that this typo (should be namePartWords) was already fixed upstream, so I've just ported that fix back into this copy of the utility function


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2101 **Author:** [@selfhost-alt](https://github.com/selfhost-alt) **Created:** 9/15/2023 **Status:** ✅ Merged **Merged:** 9/17/2023 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix-parse-full-name-typo` --- ### 📝 Commits (1) - [`f7849d2`](https://github.com/advplyr/audiobookshelf/commit/f7849d2956d3d1d324b270b37a2c044b863676c4) Fix typo in fixParsedNameCase ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/parsers/parseFullName.js` (+3 -3) </details> ### 📄 Description I noticed the following crash in my server: ``` /server/utils/parsers/parseFullName.js:73 nameParts[j].slice(-1) !== '.' && ^ TypeError: Cannot read properties of undefined (reading 'slice') at fixParsedNameCase (/server/utils/parsers/parseFullName.js:73:28) at module.exports (/server/utils/parsers/parseFullName.js:344:16) at parseName (/server/utils/parsers/parseNameString.js:9:15) at /server/utils/parsers/parseNameString.js:81:20 at Array.forEach (<anonymous>) at Object.module.exports.parse (/server/utils/parsers/parseNameString.js:80:18) at /server/scanner/BookScanner.js:650:54 at Array.forEach (<anonymous>) at BookScanner.getBookMetadataFromScanData (/server/scanner/BookScanner.js:640:24) at BookScanner.rescanExistingBookLibraryItem (/server/scanner/BookScanner.js:172:37) ``` When I dug in, I found a suspicious use of `nameParts` where it didn't really make sense in that context. When I clicked through to the code where this util was copied from, I found that this typo (should be `namePartWords`) was [already fixed upstream](https://github.com/RateGravity/parse-full-name/commit/9795b35b2f5bf4aae4b65ed75f246395e6c1d02f), so I've just ported that fix back into this copy of the utility function --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:30 +02:00
adam closed this issue 2026-04-25 00:16:30 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3652