You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
unbreak switching from draft to slate
This commit is contained in:
@@ -74,7 +74,7 @@ class HistoryItem {
|
|||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.error("unknown format -> outputFormat conversion");
|
console.error("unknown format -> outputFormat conversion");
|
||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,10 +91,15 @@ export default class ComposerHistoryManager {
|
|||||||
// TODO: Performance issues?
|
// TODO: Performance issues?
|
||||||
let item;
|
let item;
|
||||||
for (; item = sessionStorage.getItem(`${this.prefix}[${this.currentIndex}]`); this.currentIndex++) {
|
for (; item = sessionStorage.getItem(`${this.prefix}[${this.currentIndex}]`); this.currentIndex++) {
|
||||||
|
try {
|
||||||
this.history.push(
|
this.history.push(
|
||||||
HistoryItem.fromJSON(JSON.parse(item))
|
HistoryItem.fromJSON(JSON.parse(item))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.warn("Throwing away unserialisable history", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.lastIndex = this.currentIndex;
|
this.lastIndex = this.currentIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user