thrownewUserDataSyncError(localize('errorInvalidSettings',"Unable to sync keybindings because the content in the file is not valid. Please open the file and correct it."),UserDataSyncErrorCode.LocalInvalidContent,this.resource);
}
...
...
@@ -177,9 +178,13 @@ export class KeybindingsSynchroniser extends AbstractJsonFileSynchroniser implem
this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing keybindings.`);
}
if(content!==null&&this.hasErrors(content)){
if(content!==null){
content=content.trim();
content=content||'[]';
if(this.hasErrors(content)){
thrownewUserDataSyncError(localize('errorInvalidSettings',"Unable to sync keybindings because the content in the file is not valid. Please open the file and correct it."),UserDataSyncErrorCode.LocalInvalidContent,this.resource);
}
}
if(localChange!==Change.None){
this.logService.trace(`${this.syncResourceLogLabel}: Updating local keybindings...`);