File tree Expand file tree Collapse file tree 3 files changed +3802
-4
lines changed Expand file tree Collapse file tree 3 files changed +3802
-4
lines changed Original file line number Diff line number Diff line change 1+ const _ = require ( 'lodash' )
12class serverlessPluginIfElse {
23 /**
34 *
@@ -110,10 +111,10 @@ class serverlessPluginIfElse {
110111 return ;
111112 }
112113 }
113- if ( path [ i ] in item ) {
114+ if ( _ . get ( item , path [ i ] ) ) {
114115 if ( type == "remove" ) {
115116 this . serverless . cli . log ( this . pluginName + " - Excluding: " + keyPath ) ;
116- delete item [ path [ i ] ] ;
117+ _ . unset ( item , [ path [ i ] ] ) ;
117118 } else if ( type == "set" ) {
118119 item [ path [ i ] ] = newValue ;
119120 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" : {},
23+ "dependencies" : {
24+ "lodash" : " ^4.17.21"
25+ },
2426 "repository" : {
2527 "type" : " git" ,
2628 "url" : " git+https://github.com/anantab/serverless-plugin-ifelse.git"
2931 "url" : " https://github.com/anantab/serverless-plugin-ifelse/issues"
3032 },
3133 "homepage" : " https://github.com/anantab/serverless-plugin-ifelse"
32- }
34+ }
You can’t perform that action at this time.
0 commit comments