mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-23 02:17:40 -07:00
refactor
This commit is contained in:
parent
c1fe5abbc9
commit
e7612790f5
1 changed files with 3 additions and 3 deletions
|
@ -55,16 +55,16 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isMe(): boolean {
|
isMe(): boolean {
|
||||||
return this.message.userId == this.$store.state.i.id;
|
return this.message.userId === this.$store.state.i.id;
|
||||||
},
|
},
|
||||||
urls(): string[] {
|
urls(): string[] {
|
||||||
if (this.message.text) {
|
if (this.message.text) {
|
||||||
const ast = parse(this.message.text);
|
const ast = parse(this.message.text);
|
||||||
return unique(ast
|
return unique(ast
|
||||||
.filter(t => ((t.node.type == 'url' || t.node.type == 'link') && t.node.props.url && !t.node.props.silent))
|
.filter(t => ((t.node.type === 'url' || t.node.type === 'link') && t.node.props.url && !t.node.props.silent))
|
||||||
.map(t => t.node.props.url));
|
.map(t => t.node.props.url));
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue