fix skip flow when actualurl is an empty string #4328
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Test case is from hbbtv.org, which is the HBBTV official site. This case is expect to report a C01 error to the hbbtv test server, but gets none.
First tips
I found out the reason is that atucalurl is an empty string.
If using the old expresseion:
if (actualurl && (actualurl !== url))
, it will return false and skip the statements in the curly brace. It needs to change to the new expression:if (actualurl !== null && actualurl !== undefined && (actualurl !== url))
.Second tips
The testcase supposes to get the report with serviceLocation, so I append it.
Please have a look, check & verify this Pull Request. Thank you!