Details
-
Suggestion
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.15.0, 6.0
-
None
Description
Sorry I did not state the problem as clear as I should have. I guess I need to
make it obvious. I thought I did that. But I was wrong. I will try make the title more obvious.
This is NOT a SUGGESTION.
If someone thinks checking to prevent an error, should throw an error, the purpose of "typeof"
is not understood.
=================================================================
I did a test. I created a Qt Quick Prototype that contains a window.
In the window I created an Item and an Component.onCompleted element.
In the Item I created a function that passes an argument.
In the function I test for the typeof value of a property that does exist
but the qualified property of the argument does exist. The qualified property does not.
( see the two attached snapshots)
If I do: typeof === "undefined", then it produces the correct result.
However,
If I do: typeof(x.z ) === "undefined", then if throws a bad reference error.
I don't expect that the testing for existence of an undefined object or
undefined property of an object should throw an error. The purpose was
to detect the undefined element.