提交 10eb2b73 编写于 作者: B Benjamin Pasero

more fixes for #34490

上级 e7293b93
......@@ -720,7 +720,10 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
if (input instanceof EditorInput) {
const factory = registry.getEditorInputFactory(input.getTypeId());
if (factory) {
return { editorInputJSON: { typeId: input.getTypeId(), deserialized: factory.serialize(input) } } as ISerializedEditorHistoryEntry;
const deserialized = factory.serialize(input);
if (deserialized) {
return { editorInputJSON: { typeId: input.getTypeId(), deserialized } } as ISerializedEditorHistoryEntry;
}
}
}
......@@ -754,10 +757,11 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
}
// Editor input: via factory
if (serializedEditorHistoryEntry.editorInputJSON) {
const factory = registry.getEditorInputFactory(serializedEditorHistoryEntry.editorInputJSON.typeId);
const { editorInputJSON } = serializedEditorHistoryEntry;
if (editorInputJSON && editorInputJSON.deserialized) {
const factory = registry.getEditorInputFactory(editorInputJSON.typeId);
if (factory) {
return factory.deserialize(this.instantiationService, serializedEditorHistoryEntry.editorInputJSON.deserialized);
return factory.deserialize(this.instantiationService, editorInputJSON.deserialized);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册