public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Lukas Wagner <l.wagner@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup] ui: sync job: fix error if local namespace is selected first
Date: Thu, 25 Apr 2024 11:53:24 +0200	[thread overview]
Message-ID: <5afbf61f-407c-4d58-88bc-fdee8d1819a2@proxmox.com> (raw)
In-Reply-To: <20240425085936.125328-1-l.wagner@proxmox.com>

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@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".


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


      reply	other threads:[~2024-04-25  9:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25  8:59 [pbs-devel] " Lukas Wagner
2024-04-25  9:53 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5afbf61f-407c-4d58-88bc-fdee8d1819a2@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=l.wagner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal