fix(AllowListPlugin): Safely handle default allow navigation policy in allow request (#1342)

This commit is contained in:
Joel Skrepnek 2021-09-08 22:58:58 -07:00 committed by GitHub
parent 7a67e00b9f
commit aea6b7f6f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,7 @@ public class AllowListPlugin extends CordovaPlugin {
@Override
public Boolean shouldAllowRequest(String url) {
return (this.shouldAllowNavigation(url) || this.allowedRequests.isUrlAllowListed(url))
return (Boolean.TRUE.equals(this.shouldAllowNavigation(url)) || this.allowedRequests.isUrlAllowListed(url))
? true
: null; // default policy
}