1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-06 05:07:41 +02:00

fix(expressions): fix the issue with data missing on entries fetch

This commit is contained in:
Awilum
2022-08-30 21:07:19 +03:00
parent 70543750cb
commit 8f3a4514ec

View File

@@ -47,7 +47,16 @@ class EntriesExpressionsMethods
*/
public function fetch(string $id, array $options = []): \Glowy\Arrays\Arrays
{
return entries()->fetch($id, $options);
// Backup current entry data
$original = entries()->registry()->get('methods.fetch');
// Do fetch the data from the resource.
$result = entries()->fetch($id, $options);
// Restore original entry data
entries()->registry()->set('methods.fetch', $original);
return $result;
}
/**