Skip to content

Commit

Permalink
fix: issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dipratap committed Sep 18, 2024
1 parent 0b71522 commit 55108c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/metatags/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default async function auditMetaTags(message, context) {
for (const [pageUrl, pageTags] of Object.entries(extractedTags)) {
seoChecks.performChecks(pageUrl, pageTags);
}
seoChecks.organizeDetectedTags();
seoChecks.finalChecks();
const detectedTags = seoChecks.getDetectedTags();
// Prepare Audit result
const auditResult = {
Expand Down
4 changes: 2 additions & 2 deletions src/metatags/seo-checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class SeoChecks {
if (tagContent === '') {
this.detectedTags[tagName][EMPTY_TAGS] ??= { pageUrls: [] };
this.detectedTags[tagName][EMPTY_TAGS].pageUrls.push(url);
} else if (tagContent.length > TAG_LENGTHS[tagName].maxLength
|| tagContent.length < TAG_LENGTHS[tagName].minLength) {
} else if (tagContent?.length > TAG_LENGTHS[tagName].maxLength
|| tagContent?.length < TAG_LENGTHS[tagName].minLength) {
this.detectedTags[tagName][LENGTH_CHECK_FAIL_TAGS] ??= {};
this.detectedTags[tagName][LENGTH_CHECK_FAIL_TAGS].url = url;
this.detectedTags[tagName][LENGTH_CHECK_FAIL_TAGS].tagContent = tagContent;
Expand Down

0 comments on commit 55108c1

Please sign in to comment.