mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-21 22:41:07 +02:00
Fix URL preview save calls
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
b75be41f94
commit
ef45d82ec6
@ -29,7 +29,10 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
saveSettings: function() {
|
saveSettings: function() {
|
||||||
return [this.refs.urlPreviewsRoom.save(), this.refs.urlPreviewsSelf.save()];
|
const promises = [];
|
||||||
|
if (this.refs.urlPreviewsRoom) promises.push(this.refs.urlPreviewsRoom.save());
|
||||||
|
if (this.refs.urlPrviewsSelf) promises.push(this.refs.urlPreviewsSelf.save());
|
||||||
|
return promises;
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
@ -309,9 +309,9 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// url preview settings
|
// url preview settings
|
||||||
const ps = this.saveUrlPreviewSettings();
|
let ps = this.saveUrlPreviewSettings();
|
||||||
if (ps.length > 0) {
|
if (ps.length > 0) {
|
||||||
promises.push(ps);
|
ps.map(p => promises.push(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
// related groups
|
// related groups
|
||||||
|
Loading…
x
Reference in New Issue
Block a user