File tree Expand file tree Collapse file tree 3 files changed +6
-3801
lines changed Expand file tree Collapse file tree 3 files changed +6
-3801
lines changed Original file line number Diff line number Diff line change 1- const _ = require ( 'lodash' )
21class serverlessPluginIfElse {
32 /**
43 *
@@ -111,10 +110,13 @@ class serverlessPluginIfElse {
111110 return ;
112111 }
113112 }
114- if ( _ . get ( item , path [ i ] ) ) {
113+ if ( path [ i ] in item ) {
115114 if ( type == "remove" ) {
116115 this . serverless . cli . log ( this . pluginName + " - Excluding: " + keyPath ) ;
117- _ . unset ( item , [ path [ i ] ] ) ;
116+ delete item [ path [ i ] ] ;
117+ if ( Array . isArray ( item ) ) {
118+ item = item . filter ( i => i ) ;
119+ }
118120 } else if ( type == "set" ) {
119121 item [ path [ i ] ] = newValue ;
120122 if ( typeof newValue == "object" ) {
Original file line number Diff line number Diff line change 2020 "eslint" : " ^7.20.0" ,
2121 "jest" : " ^26.6.3"
2222 },
23- "dependencies" : {
24- "lodash" : " ^4.17.21"
25- },
23+ "dependencies" : {},
2624 "repository" : {
2725 "type" : " git" ,
2826 "url" : " git+https://github.com/anantab/serverless-plugin-ifelse.git"
You can’t perform that action at this time.
0 commit comments