simplify null check

main
Brian Hicks 2023-02-10 05:36:17 -06:00
parent 5193021305
commit 000f068ab3
Signed by: brian
GPG Key ID: C4F324B9CAAB0D50
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
var action = new PlugIn.Action(async () => {
try {
let req = URL.FetchRequest.fromString("https://api.linear.app/graphql");
if (req === null || req.url === null || req.url.host === null) {
if (!req?.url?.host) {
throw "could not parse the URL for Linear's API";
}
/////////////////////////////////////

View File

@ -4,7 +4,7 @@
var action = new PlugIn.Action(async () => {
try {
let req = URL.FetchRequest.fromString("https://api.linear.app/graphql");
if (req === null || req.url === null || req.url.host === null) {
if (!req?.url?.host) {
throw "could not parse the URL for Linear's API";
}