Skip to content

Commit

Permalink
Fixed #4105
Browse files Browse the repository at this point in the history
Signed-off-by: brandonkelly <[email protected]>
  • Loading branch information
brandonkelly committed Apr 5, 2019
1 parent 0171891 commit 76e8248
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

### Fixed
- Fixed a PHP error that could occur during asset indexing in some cases.
- Fixed a bug where entry drafts weren’t showing previous changes to Matrix fields on the draft. ([#4105](https://github.com/craftcms/cms/issues/4105))

## 3.1.21.1 - 2019-04-04

Expand Down
5 changes: 1 addition & 4 deletions src/fields/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,7 @@ public function getInputHtml($value, ElementInterface $element = null): string
}

if ($value instanceof MatrixBlockQuery) {
$value = $value
->limit(null)
->anyStatus()
->all();
$value = $value->getCachedResult() ?? $value->limit(null)->anyStatus()->all();
}

// Safe to set the default blocks?
Expand Down

0 comments on commit 76e8248

Please sign in to comment.