[PATCH] [widgets.js] fix obvious bug detected by sonar

Denis Laxalde denis.laxalde at logilab.fr
Mon Jun 11 16:54:23 CEST 2018


Nicolas Chauvat a écrit :
> # HG changeset patch
> # User Nicolas Chauvat <nicolas.chauvat at logilab.fr>
> # Date 1528304064 -7200
> #      Wed Jun 06 18:54:24 2018 +0200
> # Node ID 146ea99b027c6b6ec4e7a6720260ba91bd820532
> # Parent  aa15dd521d04cf682ef44b866ea26bfea8f939ce
> [widgets.js] fix obvious bug detected by sonar

Applied, thanks.

> diff --git a/cubicweb/web/data/cubicweb.widgets.js b/cubicweb/web/data/cubicweb.widgets.js
> --- a/cubicweb/web/data/cubicweb.widgets.js
> +++ b/cubicweb/web/data/cubicweb.widgets.js
> @@ -149,11 +149,11 @@ function getJSON(url, data, callback) {
>                 toto, titi, tu....  The autocompletion must be
>                 performed only on the last of such a list of terms.
>                */
>              var settings = $(this.element).data('settings');
>              var value = this.valueMethod.apply( this.element, arguments );
> -            if (settings.multiple & arguments.length === 0) {
> +            if (settings.multiple && arguments.length === 0) {
>                  return extractLast(value);
>              }
>              return value
>          },
> 


More information about the cubicweb-devel mailing list