Skip to content

Commit 45bf8e5

Browse files
committed
Refactor: Enhance logging for custom selectors retrieval in config.js
1 parent 78a44f5 commit 45bf8e5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,12 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
451451
(async () => {
452452
try {
453453
const selectors = await StateStore.getCustomSelectors(request.site);
454-
logConfigurationRelatedStuff('Retrieved custom selectors for: ' + request.site);
454+
if (selectors) {
455+
logConfigurationRelatedStuff('Retrieved custom selectors for: ' + request.site);
456+
} else {
457+
logConfigurationRelatedStuff('No custom selectors found for: ' + request.site +
458+
'. Using default selectors defined in utils.js.');
459+
}
455460
sendResponse({ selectors: selectors || null });
456461
} catch (error) {
457462
handleStorageError(error);

0 commit comments

Comments
 (0)