File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/vs/workbench/api/common Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export class ExtHostMessageService {
50
50
}
51
51
52
52
const commands : { title : string ; isCloseAffordance : boolean ; handle : number } [ ] = [ ] ;
53
+ let hasCloseAffordance = false ;
53
54
54
55
for ( let handle = 0 ; handle < items . length ; handle ++ ) {
55
56
const command = items [ handle ] ;
@@ -58,8 +59,15 @@ export class ExtHostMessageService {
58
59
} else if ( typeof command === 'object' ) {
59
60
const { title, isCloseAffordance } = command ;
60
61
commands . push ( { title, isCloseAffordance : ! ! isCloseAffordance , handle } ) ;
62
+ if ( isCloseAffordance ) {
63
+ if ( hasCloseAffordance ) {
64
+ this . _logService . warn ( `[${ extension . identifier } ] Only one message item can have 'isCloseAffordance':` , command ) ;
65
+ } else {
66
+ hasCloseAffordance = true ;
67
+ }
68
+ }
61
69
} else {
62
- this . _logService . warn ( ' Invalid message item:' , command ) ;
70
+ this . _logService . warn ( `[ ${ extension . identifier } ] Invalid message item:` , command ) ;
63
71
}
64
72
}
65
73
You can’t perform that action at this time.
0 commit comments