Skip to content

Commit

Permalink
simplify null check
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Feb 10, 2023
1 parent 5193021 commit 000f068
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Linear.omnifocusjs/Resources/pull.js
Expand Up @@ -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";
}
/////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion Linear.omnifocusjs/Resources/pull.ts
Expand Up @@ -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";
}

Expand Down

0 comments on commit 000f068

Please sign in to comment.