Skip to content

Commit

Permalink
v8.0.15
Browse files Browse the repository at this point in the history
- Merge pr #410 by @andremacola
  • Loading branch information
ndaidong committed Oct 26, 2024
1 parent 20f34a8 commit bc624f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node_version: [18.x, 20.x, 22.x]
node_version: [18.x, 20.x, 22.x, 23.x]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "8.0.14",
"version": "8.0.15",
"name": "@extractus/article-extractor",
"description": "To extract main article from given URL",
"homepage": "https://github.com/extractus/article-extractor",
Expand Down Expand Up @@ -38,7 +38,7 @@
},
"devDependencies": {
"@types/sanitize-html": "^2.13.0",
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"globals": "^15.11.0",
"https-proxy-agent": "^7.0.5",
"nock": "^13.5.5"
Expand Down
3 changes: 2 additions & 1 deletion src/utils/extractLdSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export default (document, entry) => {
const ldSchemas = document.querySelectorAll('script[type="application/ld+json"]')
ldSchemas.forEach(ldSchema => {
const ldJson = parseJson(ldSchema.textContent.replace(/[\n\r\t]/g, ''))
const isAllowedLdJsonType = typeSchemas.includes(ldJson['@type']?.toLowerCase())
const ldJsonType = ldJson['@type']?.toLowerCase() || null
const isAllowedLdJsonType = ldJsonType ? typeSchemas.includes(ldJsonType) : false

if (ldJson && isAllowedLdJsonType) {
Object.entries(attributeLists).forEach(([key, attr]) => {
Expand Down

0 comments on commit bc624f2

Please sign in to comment.