Eliminate if-statement (#3562)
This commit is contained in:
parent
a2db4db963
commit
15b11e59f4
1 changed files with 3 additions and 8 deletions
|
@ -67,14 +67,9 @@ export default Vue.component('misskey-flavored-markdown', {
|
||||||
render(createElement) {
|
render(createElement) {
|
||||||
if (this.text == null || this.text == '') return;
|
if (this.text == null || this.text == '') return;
|
||||||
|
|
||||||
let ast: Node[];
|
const ast = this.ast == null ?
|
||||||
|
parse(this.text, this.plainText) : // Parse text to ast
|
||||||
if (this.ast == null) {
|
this.ast as Node[];
|
||||||
// Parse text to ast
|
|
||||||
ast = parse(this.text, this.plainText);
|
|
||||||
} else {
|
|
||||||
ast = this.ast as Node[];
|
|
||||||
}
|
|
||||||
|
|
||||||
let bigCount = 0;
|
let bigCount = 0;
|
||||||
let motionCount = 0;
|
let motionCount = 0;
|
||||||
|
|
Loading…
Reference in a new issue