Skip to content

Commit

Permalink
🐛 Replace nullish coalescing operator ?? with || to support older Node
Browse files Browse the repository at this point in the history
Fixes #44
  • Loading branch information
kiliman committed Mar 24, 2021
1 parent 64af3f6 commit 285cd41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const processComponentPage = async url => {
const items = $previewdoc('head>link,head>script')
for (let i = 0; i < items.length; i++) {
const $item = $(items[i])
const url = $item.attr('src') ?? $item.attr('href')
const url = $item.attr('src') || $item.attr('href')
if (!url.startsWith('/')) continue

// check cache to see if we've already downloaded this file
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tailwindui-crawler",
"version": "2.5.0",
"version": "2.5.1",
"description": "Download TailwindUI components",
"main": "index.js",
"author": "kiliman <[email protected]>",
Expand Down

0 comments on commit 285cd41

Please sign in to comment.