1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-07 21:56:33 +02:00

feat(media): fix ModifiedAtField

This commit is contained in:
Awilum
2021-08-09 22:44:01 +03:00
parent 9b77dc2469
commit 49acc23480

View File

@@ -13,9 +13,9 @@ emitter()->addListener('onMediaFetchSingleHasResult', static function (): void {
return;
}
if (content()->registry()->get('fetch.data.modified_at') !== null) {
if (media()->registry()->get('fetch.data.modified_at') !== null) {
return;
}
content()->registry()->set('fetch.data.modified_at', (int) filesystem()->file(content()->getFileLocation(content()->registry()->get('fetch.id')))->lastModified());
media()->registry()->set('fetch.data.modified_at', (int) filesystem()->file(media()->getFileLocation(media()->registry()->get('fetch.id')))->lastModified());
});