mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Handle cases where className is a dictionary instead of string
This commit is contained in:
parent
54ad303ed7
commit
81c125ed50
1 changed files with 5 additions and 1 deletions
|
|
@ -2797,10 +2797,14 @@ Readability.prototype = {
|
|||
},
|
||||
|
||||
_isOmnivoreNode: function(node) {
|
||||
const prefix = '_omnivore'
|
||||
var walk = node
|
||||
|
||||
while (walk) {
|
||||
if (walk.className && walk.className.startsWith("_omnivore")) {
|
||||
if (walk.className && walk.className.startsWith && walk.className.startsWith(prefix)) {
|
||||
return true
|
||||
}
|
||||
if (walk.className && walk.className.hasOwnProperty && walk.className.hasOwnProperty(prefix)) {
|
||||
return true
|
||||
}
|
||||
walk = walk.parentElement
|
||||
|
|
|
|||
Loading…
Reference in a new issue