File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -4468,25 +4468,25 @@ Node.prototype._escapeJSON = function (text) {
44684468 * @private
44694469 */
44704470Node . prototype . updateNodeName = function ( ) {
4471- try {
4472- var count = this . childs ? this . childs . length : 0 ;
4473- var nodeName ;
4474- if ( this . type === 'object' || this . type === 'array' ) {
4475- if ( this . editor . options . onNodeName ) {
4471+ var count = this . childs ? this . childs . length : 0 ;
4472+ var nodeName ;
4473+ if ( this . type === 'object' || this . type === 'array' ) {
4474+ if ( this . editor . options . onNodeName ) {
4475+ try {
44764476 nodeName = this . editor . options . onNodeName ( {
44774477 path : this . getPath ( ) ,
44784478 size : count ,
44794479 type : this . type
44804480 } ) ;
44814481 }
4482-
4483- this . dom . value . innerHTML = ( this . type === 'object' )
4484- ? '{' + ( nodeName || count ) + '}'
4485- : '[' + ( nodeName || count ) + ']' ;
4482+ catch ( err ) {
4483+ console . error ( 'Error in onNodeName callback: ' , err ) ;
4484+ }
44864485 }
4487- }
4488- catch ( err ) {
4489- console . error ( 'Error in onNodeName callback: ' , err ) ;
4486+
4487+ this . dom . value . innerHTML = ( this . type === 'object' )
4488+ ? ( '{' + ( nodeName || count ) + '}' )
4489+ : ( '[' + ( nodeName || count ) + ']' ) ;
44904490 }
44914491}
44924492
You can’t perform that action at this time.
0 commit comments