fix possible npe

This commit is contained in:
dcore94 2023-11-16 11:31:34 +01:00
parent d374f62ae0
commit 5476851d1f
1 changed files with 1 additions and 1 deletions

View File

@ -985,7 +985,7 @@ class CCPMethodEditorController extends HTMLElement{
const val = 'deploy-script'
return this.#current.additionalParameters.parameters.map(
(script, i) => {
let code = script.value.length ? script.value.join("\r\n") : ""
let code = script.value && script.value.length ? script.value.join("\r\n") : ""
return `
<textarea rows="5" class="script-area form-control ${script.name === val ? '' : 'd-none'}" name="${script.name}">${code}</textarea>
`