Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
added handling for when no matches are found
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollorion committed Jan 21, 2021
1 parent bb9d80f commit 1d80dc9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Binary file modified Fly.alfredworkflow
Binary file not shown.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ function fly_filter(){
arg: JSON.stringify(element)
}));

if(items.length === 0){
items = [
{
title: "Uh Oh...",
subtitle: "No matches found 😕",
arg: JSON.stringify({url: "http://fly.apollorion.com"})
}
]
}

// Return items
alfy.output(items);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apollorion-fly",
"version": "2.2.0",
"version": "2.3.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1d80dc9

Please sign in to comment.