mirror of https://github.com/ghostfolio/ghostfolio
Browse Source
hasNotDefinedValuesInObject returned the result of the first nested object it encountered, so sibling keys after a fully defined nested object were never checked. A later null or undefined value (or a later nested object holding one) was therefore missed and the function incorrectly returned false. Only return early on a positive hit and keep scanning the remaining keys otherwise, so the function returns true if any key (nested or not) is null or undefined and false only after all keys are clean. This ensures hasError is set correctly in the portfolio details endpoint.pull/7068/head
3 changed files with 114 additions and 2 deletions
Loading…
Reference in new issue