Skip to content

Commit

Permalink
add string compare for internal links
Browse files Browse the repository at this point in the history
  • Loading branch information
nivv committed Feb 20, 2023
1 parent 60a7fa8 commit f8164e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ContentGetters/ButtonGetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Ikoncept\Fabriq\Fabriq;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Infab\TranslatableRevisions\Models\RevisionMeta;

class ButtonGetter
Expand Down Expand Up @@ -34,7 +35,7 @@ public static function get(RevisionMeta $meta, $publishing = false)
return $value;
}

if ($value['linkType'] === 'internal') {
if (Str::contains($value['linkType'], 'internal')) {
if (empty($value['page_id'])) {
return $value;
}
Expand Down

0 comments on commit f8164e4

Please sign in to comment.