mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(devtools): show not-angular popup for non-angular apps
This commit is contained in:
@@ -100,16 +100,18 @@ const getPopUpName = (ng: AngularDetection) => {
|
||||
};
|
||||
|
||||
chrome.runtime.onMessage.addListener((req, sender) => {
|
||||
if (sender.tab && req.isAngular) {
|
||||
if (sender && sender.tab) {
|
||||
chrome.browserAction.setPopup({
|
||||
tabId: sender.tab.id,
|
||||
popup: `popups/${getPopUpName(req)}`,
|
||||
});
|
||||
}
|
||||
if (sender && sender.tab && req.isAngular) {
|
||||
chrome.browserAction.setIcon({
|
||||
tabId: sender.tab.id,
|
||||
path: {
|
||||
16: `assets/favicon.ico`,
|
||||
},
|
||||
});
|
||||
chrome.browserAction.setPopup({
|
||||
tabId: sender.tab.id,
|
||||
popup: `popups/${getPopUpName(req)}`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user