Skip to content

Commit

Permalink
fix: always truthy check
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Jul 15, 2023
1 parent b85892b commit cc76e95
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/popup/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Home = () => {
const emojiResponse = await getEmojis();
const emojis = emojiResponse.data;

if (!emojis) {
if (!emojis.length) {
return;
}

Expand Down Expand Up @@ -167,14 +167,12 @@ const Home = () => {
.then(data => chrome.tabs.create(
{ url: "https://www.linkedin.com/in/me/edit/forms/project/new/", active: true },
tab => {
chrome.scripting
void chrome.scripting
.executeScript({
target: { tabId: tab.id! },
func: populateDataToLinkedIn,
args: [data],
})
.then(() => console.log("script injected"))
.catch(err => console.log(err));
});
},

))
Expand Down

0 comments on commit cc76e95

Please sign in to comment.