@@ -7823,7 +7823,7 @@ export class AdapterClass extends EventEmitter {
78237823 return tools . maybeCallbackWithError ( callback , e ) ;
78247824 }
78257825 } else {
7826- this . _logger . warn ( `${ this . namespaceLog } ${ ` Alias ${ fixedId } has no target 2` } ` ) ;
7826+ this . _logger . warn ( `${ this . namespaceLog } Alias ${ fixedId } has no target 2` ) ;
78277827 return tools . maybeCallbackWithError ( callback , `Alias ${ fixedId } has no target` ) ;
78287828 }
78297829 } else {
@@ -8578,7 +8578,7 @@ export class AdapterClass extends EventEmitter {
85788578 callback
85798579 ) ;
85808580 } else {
8581- this . _logger . warn ( `${ this . namespaceLog } Alias ${ id } has no target 4 ` ) ;
8581+ this . _logger . warn ( `${ this . namespaceLog } Alias ${ id } has no target 3 ` ) ;
85828582 return tools . maybeCallbackWithError ( callback , `Alias ${ id } has no target` ) ;
85838583 }
85848584 } else {
@@ -8660,7 +8660,7 @@ export class AdapterClass extends EventEmitter {
86608660 callback
86618661 ) ;
86628662 } else {
8663- this . _logger . warn ( `${ this . namespaceLog } Alias ${ id } has no target 5 ` ) ;
8663+ this . _logger . warn ( `${ this . namespaceLog } Alias ${ id } has no target 4 ` ) ;
86648664 return tools . maybeCallbackWithError ( callback , `Alias ${ id } has no target` ) ;
86658665 }
86668666 } else {
@@ -8939,7 +8939,6 @@ export class AdapterClass extends EventEmitter {
89398939 }
89408940
89418941 if ( id . startsWith ( ALIAS_STARTS_WITH ) ) {
8942- // TODO: optimize alias GET performance
89438942 if ( obj ?. common ?. alias ?. id ) {
89448943 // id can be string or can have attribute id.read
89458944 const aliasId = tools . isObject ( obj . common . alias . id ) ? obj . common . alias . id . read : obj . common . alias . id ;
@@ -8991,8 +8990,8 @@ export class AdapterClass extends EventEmitter {
89918990 ) ;
89928991 }
89938992 } else {
8994- this . _logger . warn ( ` ${ this . namespaceLog } Alias ${ id } has no target 8` ) ;
8995- return tools . maybeCallbackWithError ( callback , `Alias ${ id } has no target` ) ;
8993+ // alias object non-existing or points to nowhere -> handle it like a non-existing state
8994+ return tools . maybeCallbackWithError ( callback , null , null ) ;
89968995 }
89978996 } else {
89988997 if ( this . oStates && this . oStates [ id ] ) {
@@ -9651,8 +9650,8 @@ export class AdapterClass extends EventEmitter {
96519650 }
96529651 } else if ( aliasObj && aliasObj . type === 'state' ) {
96539652 // if state and no id given -> if no state just ignore it
9654- this . _logger . warn ( `${ this . namespaceLog } Alias ${ aliasObj . _id } has no target 12 ` ) ;
9655- return tools . maybeCallbackWithError ( callback , new Error ( `Alias ${ aliasObj . _id } has no target 12 ` ) ) ;
9653+ this . _logger . warn ( `${ this . namespaceLog } Alias ${ aliasObj . _id } has no target 5 ` ) ;
9654+ return tools . maybeCallbackWithError ( callback , new Error ( `Alias ${ aliasObj . _id } has no target` ) ) ;
96569655 } else {
96579656 return tools . maybeCallback ( callback ) ;
96589657 }
0 commit comments