From 5cdd18f52d83d9ef5c17a7d3f04b36352a4e1cb4 Mon Sep 17 00:00:00 2001 From: Andreas Plesch Date: Wed, 11 Dec 2024 00:55:12 -0500 Subject: [PATCH] improve field names for forwarding (#396) --- src/util/protos/ProtoDeclaration.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util/protos/ProtoDeclaration.js b/src/util/protos/ProtoDeclaration.js index 252185953e..c5c12122fc 100644 --- a/src/util/protos/ProtoDeclaration.js +++ b/src/util/protos/ProtoDeclaration.js @@ -340,11 +340,12 @@ x3dom.ProtoDeclaration.prototype.registerNode = function () _normalizeName : function ( name, node ) { - if ( name in node._vf ) + var stripped = name.replace( /^set_/, "" ).replace( /_changed$/, "" ); + if ( stripped in node._vf ) { - return name; + return stripped; } - return name.replace( /^set_/, "" ).replace( /_changed$/, "" ); + return name; }, _setupFieldWatchers : function ( field )