File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
AdminForthResourceColumn ,
11
11
AllowedActions ,
12
12
ShowIn ,
13
+ ShowInInput ,
13
14
} from "../types/Back.js" ;
14
15
15
16
import fs from 'fs' ;
@@ -299,13 +300,12 @@ export default class ConfigValidator implements IConfigValidator {
299
300
let showIn = column . showIn || { all : true } ;
300
301
301
302
if ( column . showIn && Array . isArray ( column . showIn ) ) {
302
- showIn = Object . keys ( AdminForthResourcePages ) . reduce ( ( acc , key ) => {
303
+ showIn = Object . values ( AdminForthResourcePages ) . reduce ( ( acc , key ) => {
303
304
return {
304
305
...acc ,
305
306
[ key ] : column . showIn . includes ( key ) ,
306
307
}
307
- } , { } ) ;
308
- delete showIn . all ;
308
+ } , { } as ShowInInput ) ;
309
309
if ( warnings . filter ( ( w ) => w . includes ( 'showIn should be an object, array is deprecated' ) ) . length === 0 ) {
310
310
warnings . push ( `Resource "${ resInput . resourceId || resInput . table } " column "${ column . name } " showIn should be an object, array is deprecated` ) ;
311
311
}
You can’t perform that action at this time.
0 commit comments