Skip to content

Commit dc5fd6b

Browse files
committed
TaggableBehavior::afterFind refactoring
1 parent 22ef942 commit dc5fd6b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/TaggableBehavior.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,9 @@ public function hasTagNames($names)
128128
*/
129129
public function afterFind()
130130
{
131-
if (!$this->owner->isRelationPopulated($this->tagRelation)) {
132-
return;
131+
if ($this->owner->isRelationPopulated($this->tagRelation)) {
132+
$this->populateTagNames();
133133
}
134-
135-
$this->populateTagNames();
136134
}
137135

138136
/**

0 commit comments

Comments
 (0)