1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-05 02:08:14 +09:00

Fix: url-preview (#3397)

This commit is contained in:
MeiMei 2018-11-25 01:39:22 +09:00 committed by syuilo
parent 60e10d4efa
commit 93f13ffc8e
4 changed files with 8 additions and 8 deletions

View File

@ -79,8 +79,8 @@ export default (opts: Opts = {}) => ({
if (this.appearNote.text) {
const ast = parse(this.appearNote.text);
return unique(ast
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
.map(t => t.url));
.filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
.map(t => t.props.url));
} else {
return null;
}

View File

@ -51,8 +51,8 @@ export default Vue.extend({
if (this.message.text) {
const ast = parse(this.message.text);
return unique(ast
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
.map(t => t.url));
.filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
.map(t => t.props.url));
} else {
return null;
}

View File

@ -151,8 +151,8 @@ export default Vue.extend({
if (this.appearNote.text) {
const ast = parse(this.appearNote.text);
return unique(ast
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
.map(t => t.url));
.filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
.map(t => t.props.url));
} else {
return null;
}

View File

@ -143,8 +143,8 @@ export default Vue.extend({
if (this.appearNote.text) {
const ast = parse(this.appearNote.text);
return unique(ast
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
.map(t => t.url));
.filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
.map(t => t.props.url));
} else {
return null;
}