File tree Expand file tree Collapse file tree 3 files changed +27
-4
lines changed
packages/core/modules/utils Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 11# Changelog
2+ - 6.6.12
3+ - Fix issue with getting field config for func arg signature object (PR #1193 ) (issue #1192 )
24- 6.6.11
35 - Fix issue with updating both config & tree value (PR #1190 ) (issue #1187 )
46- 6.6.10
Original file line number Diff line number Diff line change @@ -60,7 +60,10 @@ export const createConfigMemo = (meta = {
6060 if ( ( configStore . size + 1 ) > maxSize ) {
6161 configStore . delete ( configStore . keys ( ) . next ( ) . value ) ;
6262 }
63- configStore . set ( config , extendedConfig ) ;
63+ // Note: because of desctructing, strict find would not be possible
64+ // (see commented line in `findExtended`)
65+ // (see issue #1187)
66+ configStore . set ( { ...config } , extendedConfig ) ;
6467 } ;
6568
6669 const findBasic = ( findConfig ) => {
Original file line number Diff line number Diff line change @@ -237,7 +237,16 @@ export const getFieldSrc = (field) => {
237237 if ( ! field )
238238 return null ;
239239 if ( typeof field === "object" ) {
240- if ( ! field . func && ! ! field . type ) {
240+ // should not be possible
241+ // if (field._isFuncArg) {
242+ // // it's func arg
243+ // return null;
244+ // }
245+ // if (field._isFunc) {
246+ // // it's field func
247+ // return "func";
248+ // }
249+ if ( ! field . func && field . type ) {
241250 // it's already a config
242251 return "field" ;
243252 }
@@ -267,16 +276,25 @@ export const getFieldConfig = (config, field) => {
267276 if ( ! field )
268277 return null ;
269278 if ( typeof field == "object" ) {
270- if ( ! field . func && ! ! field . type ) {
279+ if ( ! field . func && ! ! field . type && ! ! field . widgets ) {
271280 // it's already a config
281+ // but don't mess up with obj from `getFuncSignature`, it has `type` but no `widgets` and other keys !
272282 return field ;
273283 }
284+ if ( field . _isFuncArg ) {
285+ // it's func arg
286+ return getFuncArgConfig ( config , field . _funcKey , field . _argKey ) ;
287+ }
288+ if ( field . _isFunc ) {
289+ // it's a func
290+ return getFuncConfig ( config , field . _funcKey ) ;
291+ }
274292 if ( field . func ) {
275293 if ( field . func && field . arg ) {
276294 // it's func arg
277295 return getFuncArgConfig ( config , field . func , field . arg ) ;
278296 } else {
279- // it's field func
297+ // it's a func
280298 return getFuncConfig ( config , field . func ) ;
281299 }
282300 }
You can’t perform that action at this time.
0 commit comments