has to explicit check for type of value !== null

has to explicit check for type of value !== null as the typeof null is object
https://i.stack.imgur.com/FzI1R.png
pull/1510/head
eng-eslam-a-y 2020-02-02 10:57:39 +02:00 committed by GitHub
parent a5be33741a
commit 0846c1c8d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ odoo.define('web_edit_user_filter', function (require) {
json_facet.values = facet.get('values');
_.each(json_facet.values, function (value, i) {
if (typeof value.value === 'object' &&
if (typeof value.value === 'object' && typeof value.value !== null &&
'attrs' in value.value) {
json_facet.values[i] = {
attrs: value.value.attrs,