File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed
Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change 1515 "tonicExampleFilename" : " example.js" ,
1616 "license" : " MIT" ,
1717 "dependencies" : {
18- "lodash.get" : " ^4.4.2" ,
1918 "lodash.reduce" : " ^4.6.0" ,
2019 "protodef-validator" : " ^1.3.0" ,
2120 "readable-stream" : " ^4.4.0"
Original file line number Diff line number Diff line change 11const { getFieldInfo, tryCatch } = require ( './utils' )
22const reduce = require ( 'lodash.reduce' )
3- const get = require ( 'lodash.get' )
43const Validator = require ( 'protodef-validator' )
54
65function isFieldInfo ( type ) {
@@ -60,7 +59,7 @@ class ProtoDef {
6059 function recursiveAddTypes ( protocolData , path ) {
6160 if ( protocolData === undefined ) { return }
6261 if ( protocolData . types ) { self . addTypes ( protocolData . types ) }
63- recursiveAddTypes ( get ( protocolData , path . shift ( ) ) , path )
62+ recursiveAddTypes ( protocolData ?. [ path [ 0 ] ] , path . slice ( 1 ) )
6463 }
6564
6665 if ( this . validator ) { this . validator . validateProtocol ( protocolData ) }
You can’t perform that action at this time.
0 commit comments