I'm trying to get the URL of the current tab from the extension which I'm building, but the vale is getting stored as undefined What do I need to solve this issue?
tabBtn.addEventListener("click", function () {
chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {
myLeads.push(tabs[0].url);
localStorage.setItem("myLeads", JSON.stringify(myLeads));
render(myLeads);
});
});