refactor: simplify isPresent(x) ? x : y
to x || y
(#12166)
Closes #12166
This commit is contained in:

committed by
Tobias Bosch

parent
bdcf46f82e
commit
d972d82354
@ -27,7 +27,7 @@ export class ResourceLoaderImpl extends ResourceLoader {
|
||||
// responseText is the old-school way of retrieving response (supported by IE8 & 9)
|
||||
// response/responseType properties were introduced in ResourceLoader Level2 spec (supported
|
||||
// by IE10)
|
||||
var response = isPresent(xhr.response) ? xhr.response : xhr.responseText;
|
||||
var response = xhr.response || xhr.responseText;
|
||||
|
||||
// normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
|
||||
var status = xhr.status === 1223 ? 204 : xhr.status;
|
||||
|
Reference in New Issue
Block a user