Open santomegonzalo opened 5 years ago
If I set the property safeOptions={forceInset(0, 0, 0, 0)} then the following function will break the code
safeOptions={forceInset(0, 0, 0, 0)}
const func = (pos) => safeOptions[pos] === 'always' ? safeArea[pos] : undefined;
because if we use 0,0,0,0 will never return always and in the next step you have
height: func('top') + this.props.navbarHeight,
and that will return NaN because func('top') will return undefined.
func('top')
undefined
I fixed it applying a local patch replacing it with:
const func = (pos) => safeOptions[pos] === 'always' ? safeArea[pos] : 0;
Let me know if you want me to create a PR.
Best
If I set the property
safeOptions={forceInset(0, 0, 0, 0)}
then the following function will break the codebecause if we use 0,0,0,0 will never return always and in the next step you have
and that will return NaN because
func('top')
will returnundefined
.I fixed it applying a local patch replacing it with:
Let me know if you want me to create a PR.
Best