diff options
author | Andres Rey <[email protected]> | 2016-11-22 15:52:03 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-11-22 15:52:03 +0000 |
commit | a1b4d982e6e4799d0575b083a333f59d089876a7 (patch) | |
tree | 021cb7083c52216dfd7415b7dae7ed79d259a8a9 /src/Readability.php | |
parent | cba167695482cca7492303e3de1f59333c0127b6 (diff) |
Fixed error where nodes where recognized as initialized when they weren't
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Readability.php b/src/Readability.php index 7c04044..6bc9603 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -58,13 +58,9 @@ class Readability extends Element implements ReadabilityInterface // Node was initialized previously. Restoring score and setting flag. $this->initialized = true; $score = $node->getAttribute('data-readability'); - } else { - // Fresh, uninitialized node. - $score = 0; + $this->setContentScore($score); } } - - $this->setContentScore($score); } /** |