These changes make whisks.v.2.1/packges-public view function to check whether doc.binding is undfined before getting the length of it. It can prevent from CouchDB producing unnecessary logs.
Description
When 'packages-public' view builds the index, you can find these logs.
[info] 2024-09-07T02:25:38.312234Z nonode@nohost <0.1292.0> -------- OS Process #Port<0.8249> Log :: function raised exception (new TypeError("doc.binding is not an object", "undefined", 3)) with doc._id whisk.system/user25868/TEST
I modified 'isPublicPackage' function. I believe that use 'Falsy' because there's no need to check the length of doc.binding when it is not object type. And also, it's better to check Falsy or boolean before than the length of object.
These changes make whisks.v.2.1/packges-public view function to check whether doc.binding is undfined before getting the length of it. It can prevent from CouchDB producing unnecessary logs.
Description
When 'packages-public' view builds the index, you can find these logs.
I modified 'isPublicPackage' function. I believe that use 'Falsy' because there's no need to check the length of doc.binding when it is not object type. And also, it's better to check Falsy or boolean before than the length of object.
I confirmed that CouchDB 2.3.1 and 3.3.3 don't print it out during re-building the index.
Related issue and scope
My changes affect the following components
Types of changes
Checklist: