Fix: initial state handling for env variables in preflight script (#7670)

This commit is contained in:
Michael Skorokhodov 2026-02-10 12:35:03 +01:00 committed by GitHub
parent aec59f9723
commit 8138a6cb38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'hive': patch
---
Hive Lab: Better initial state handling for env variables in preflight script

View file

@ -137,7 +137,9 @@ export async function runIsolatedLabScript(
[
cryptoJsSource.replace('}(this, function () {', '}(self, function () {'),
/* javascript */ `
const env = ${JSON.stringify(env)};
const env = {
variables: ${JSON.stringify(env?.variables)} || {},
};
let promptResolve = null;