1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-12 13:48:12 +09:00

Eliminate if-statement (#3562)

This commit is contained in:
Aya Morisawa 2018-12-09 03:44:37 +09:00 committed by GitHub
parent a2db4db963
commit 15b11e59f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,14 +67,9 @@ export default Vue.component('misskey-flavored-markdown', {
render(createElement) {
if (this.text == null || this.text == '') return;
let ast: Node[];
if (this.ast == null) {
// Parse text to ast
ast = parse(this.text, this.plainText);
} else {
ast = this.ast as Node[];
}
const ast = this.ast == null ?
parse(this.text, this.plainText) : // Parse text to ast
this.ast as Node[];
let bigCount = 0;
let motionCount = 0;