We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e9b13c commit 42526a1Copy full SHA for 42526a1
src/Uploadcare.php
@@ -67,8 +67,10 @@ public function getForm(): array
67
->inline(false),
68
Toggle::make('config.withMetadata')
69
->label(__('With metadata'))
70
- ->formatStateUsing(function ($state) {
71
- return $state ?? self::getDefaultConfig()['withMetadata'];
+ ->formatStateUsing(function ($state, $record) {
+ // Check if withMetadata exists in the config
72
+ $config = is_string($record->config) ? json_decode($record->config, true) : $record->config;
73
+ return isset($config['withMetadata']) ? $config['withMetadata'] : self::getDefaultConfig()['withMetadata'];
74
})
75
76
Toggle::make('config.imagesOnly')
0 commit comments