File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1111 *
1212 * Status: ALPHA - currently only supports get
1313 */
14- ; ( function ( _ ) {
14+ ; ( function ( _ ) {
1515
1616 // save original core accessor
1717 var _get = _ . get ;
1818 // replace with enhanced version
19- _ . get = function ( area , key , kid ) {
19+ _ . get = function ( area , key , kid ) {
2020 var s = _get ( area , key ) ;
2121 if ( s == null ) {
2222 var parts = _ . split ( key ) ;
3131 val = _ . resolvePath ( val , kid ) ;
3232 s = _ . stringify ( val ) ;
3333 } catch ( e ) {
34- console . error ( "Error accessing nested property:" , e ) ;
34+ window . console . error ( "Error accessing nested property:" , e ) ;
3535 return null ;
3636 }
3737 }
3838 return s ;
3939 } ;
4040
4141 // Helper function to resolve nested paths safely
42- _ . resolvePath = function ( obj , path ) {
43- return path . split ( '.' ) . reduce ( ( acc , key ) => acc && acc [ key ] , obj ) ;
42+ _ . resolvePath = function ( obj , path ) {
43+ return path . split ( '.' ) . reduce ( function ( acc , key ) { return acc && acc [ key ] ; } , obj ) ;
4444 } ;
4545
4646 // expose internals on the underscore to allow extensibility
47- _ . split = function ( key ) {
47+ _ . split = function ( key ) {
4848 var dot = key . lastIndexOf ( '.' ) ;
4949 if ( dot > 0 ) {
5050 var kid = key . substring ( dot + 1 , key . length ) ;
You can’t perform that action at this time.
0 commit comments