From a1b4d982e6e4799d0575b083a333f59d089876a7 Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Tue, 22 Nov 2016 15:52:03 +0000 Subject: Fixed error where nodes where recognized as initialized when they weren't --- src/Readability.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') 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); } /** -- cgit v1.2.3