[pbs-devel] applied: [PATCH proxmox-backup] ui: sync job: fix error if local namespace is selected first
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Apr 25 11:53:24 CEST 2024
Am 25/04/2024 um 10:59 schrieb Lukas Wagner:
> When creating a new sync job and a local namespace is configured
> without setting a remote first, the createMaxPrefixLength
> was passed an array instead of a string/undefined/null, which
> triggered a 'ns2.match is not a funtion exception', making the UI
> glitchy afterwards.
>
> Fixed by explicitly checking for a string. Verified that the other
> user of NamespaceMaxDepthReduced, the prune job edit window, does not
> break after the change.
>
> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
> ---
> www/form/NamespaceMaxDepth.js | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
applied, thanks!
> + if (ns1 !== undefined && ns1 !== null && typeof ns1 === 'string') {
FWIW, using just `if (typeof ns1 === 'string') ...` would be sufficient, as
"undefined" is its own type and "null" is from type "object".
More information about the pbs-devel
mailing list