Skip to content
Snippets Groups Projects
Commit 5ae8a3c7 authored by syuilo's avatar syuilo
Browse files

refactor

parent 70ee1721
No related branches found
Tags 12.47.0
No related merge requests found
......@@ -55,16 +55,16 @@ export default Vue.extend({
},
computed: {
isMe(): boolean {
return this.message.userId == this.$store.state.i.id;
return this.message.userId === this.$store.state.i.id;
},
urls(): string[] {
if (this.message.text) {
const ast = parse(this.message.text);
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));
} else {
return null;
return [];
}
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment