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

feat(directives): upd string type for @type directive

This commit is contained in:
Awilum
2022-05-16 14:09:56 +03:00
parent 7708d60f75
commit 28ccf2021d

View File

@@ -58,7 +58,7 @@ emitter()->addListener('onEntriesFetchSingleField', static function (): void {
$field['value'] = collectionFromQueryString($field['value']->toString());
}
} elseif (strings($field['value'])->contains('@type(string)')) {
$field['value'] = (string) $field['value'];
$field['value'] = strings(strings($field['value'])->replace('@type(string)', '')->trim())->toString();
} elseif (strings($field['value'])->contains('@type(null)')) {
$field['value'] = null;
}