| Summary: | [client] Forbidden access dialog does not display | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Malgorzata Janczarska <malgorzata.tomczyk> |
| Component: | Client | Assignee: | Malgorzata Janczarska <malgorzata.tomczyk> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | john.arthorne |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Malgorzata Janczarska
Done. forbiddenAccessDlg === null needed to be changed to forbiddenAccessDlg == null, because "==" compares the value and "===" includes also the type in comparison. I don't know how a type of "null" and "undefined" was compared, but apparently they were different. I think generally in comparing anything to "null" it's safer to check it with "==". == will coerce types (for example 1 == '1') and === will not. However in this case I think we could avoid confusion (and jslint complaints) by using if (!forbiddenAccessDlg) Because you really don't care about null, you just want to check that it exists or not. (Sorry to butt in, I saw this change go by and for a moment was afraid I had introduced a problem because I tend to clean up the == problem markers as I see them.) Sigh, stupid language. I was just making jslint happy but I shouldn't have touched it at this point in M6. (undefined == null) -> true (undefined === null) -> false I agree that if (!forbiddenAccessDlg) would be cleaner, but I'll leave it for now. Thanks Gosia. |