[PR #1320] [MERGED] Fix undefined string assignment #3516

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/1320
Author: @lkiesow
Created: 12/27/2022
Status: Merged
Merged: 12/27/2022
Merged by: @advplyr

Base: masterHead: undefined-default


📝 Commits (1)

  • 128796b Fix undefined string assignment

📊 Changes

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

View changed files

📝 index.js (+5 -5)

📄 Description

Assigning something to process.env.profile, Node stringifies the value. This means that assigning undefined to an environment variable in Node will result in it holding the string undefined.

This means, for example, that module.exports.FFPROBE_PATH || 'ffprobe' in server/libs/nodeFfprobe/index.js will actually result in the string undefined.

This patch fixes several such assignments in the index.js, potentially causing problems in the development mode.


🔄 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/1320 **Author:** [@lkiesow](https://github.com/lkiesow) **Created:** 12/27/2022 **Status:** ✅ Merged **Merged:** 12/27/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `undefined-default` --- ### 📝 Commits (1) - [`128796b`](https://github.com/advplyr/audiobookshelf/commit/128796bd3605b46439878406ad911788a8c2c38d) Fix undefined string assignment ### 📊 Changes **1 file changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `index.js` (+5 -5) </details> ### 📄 Description Assigning something to `process.env.profile`, Node stringifies the value. This means that assigning `undefined` to an environment variable in Node will result in it holding the string `undefined`. This means, for example, that `module.exports.FFPROBE_PATH || 'ffprobe'` in `server/libs/nodeFfprobe/index.js` will actually result in the string `undefined`. This patch fixes several such assignments in the `index.js`, potentially causing problems in the development mode. --- <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:15:57 +02:00
adam closed this issue 2026-04-25 00:15:57 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3516