Closed PiotrMachowski closed 4 years ago
uuhh, bad bug due to fix(es) for #18, #28, #24 ... looks like I am still fighting the implicit type conversion in JS, ok let's try it as explicit as possible --- first shot would be changing the line to:
return ([false, null, undefined].every(x => raw_content !== x)) ? raw_content : new Array();
What imposes directly the question: "what is a 'valid' value?", here I included false
, which might also be a valid value, so it might boil down to:
return ([null, undefined].every(x => raw_content !== x)) ? raw_content : new Array();
@PiotrMachowski if you're willing to test this directly, please give me some feedback, if it improves the behavior for you. Will try to test and push this somewhere this weekend, but feel free to PR it if you like.
@daringer I have checked both versions and they are working correctly. I don't have false
in my table, but I think that the second version is better.
If an entity has an attribute with value![image](https://user-images.githubusercontent.com/6118709/79171464-5f246600-7df2-11ea-8a70-4251d311e70b.png)
0
it is not rendered correctly:undefinedundefinedundefined
is returned instead:I believe the problem is here