Skip to content

Commit

Permalink
[7.x] Handle json data in revisions (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell authored Jul 1, 2024
1 parent fdc3d77 commit eae748e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Traits/HasRunwayResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Statamic\Fieldtypes\Section;
use Statamic\GraphQL\ResolvesValues;
use Statamic\Revisions\Revisable;
use Statamic\Support\Str;
use Statamic\Support\Traits\FluentlyGetsAndSets;
use StatamicRadPack\Runway\Data\AugmentedModel;
use StatamicRadPack\Runway\Data\HasAugmentedInstance;
Expand Down Expand Up @@ -182,8 +183,9 @@ protected function revisionAttributes(): array
->reject(fn (Field $field) => $field->fieldtype() instanceof Section)
->reject(fn (Field $field) => $field->visibility() === 'computed')
->reject(fn (Field $field) => $field->get('save', true) === false)
->map->handle()
->map(fn (Field $field) => Str::before($field->handle(), '->'))
->values()
->unique()
->all();

return [
Expand Down

0 comments on commit eae748e

Please sign in to comment.