1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 10:38:30 +00:00

4.0.0-rc18.1

* Fixed: The new ban and timeout reason context menu not appearing in rooms without chat rules set.
This commit is contained in:
SirStendec 2019-04-29 21:14:23 -04:00
parent 23816fafc9
commit 918a5fbb13
2 changed files with 28 additions and 24 deletions

View file

@ -149,7 +149,7 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}`
FrankerFaceZ.Logger = Logger;
const VER = FrankerFaceZ.version_info = {
major: 4, minor: 0, revision: 0, extra: '-rc18',
major: 4, minor: 0, revision: 0, extra: '-rc18.1',
commit: __git_commit__,
build: __webpack_hash__,
toString: () =>

View file

@ -199,6 +199,7 @@ export default class Actions extends Module {
return false;
};
if ( reasons && reasons.length ) {
for(const reason of reasons) {
const text = this.replaceVariables(reason.i18n ? this.i18n.t(reason.i18n, reason.text) : reason.text, data);
@ -212,8 +213,10 @@ export default class Actions extends Module {
</a>
</li>)
}
}
if ( reasons && reasons.length && rules && rules.length )
if ( rules && rules.length ) {
if ( reasons && reasons.length )
reason_elements.push(<div class="tw-mg-y-05 tw-border-b"></div>);
for(const rule of rules) {
@ -227,6 +230,7 @@ export default class Actions extends Module {
</a>
</li>);
}
}
let reason_text;
if ( data.definition.reason_text )