mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 15:34:26 +01:00
Fix race condition in projects initialization
Add missing return statement for gitTools.init() promise to ensure activeProject is set before getFlows() is called during startup. Fixes intermittent 'No active project' warnings when projects feature is enabled.
This commit is contained in:
@@ -92,7 +92,7 @@ function init(_settings, _runtime) {
|
||||
|
||||
if (projectsEnabled) {
|
||||
return sshTools.init(settings,runtime).then(function() {
|
||||
gitTools.init(_settings).then(function(gitConfig) {
|
||||
return gitTools.init(_settings).then(function(gitConfig) {
|
||||
if (!gitConfig || /^1\./.test(gitConfig.version)) {
|
||||
if (!gitConfig) {
|
||||
projectLogMessages.push(log._("storage.localfilesystem.projects.git-not-found"))
|
||||
|
||||
Reference in New Issue
Block a user