1
0
mirror of https://github.com/flarum/core.git synced 2025-10-15 08:55:53 +02:00

Default force attr to true on LinkButton

This retains beta 13 behavior.
This commit is contained in:
Alexander Skvortsov
2020-10-15 18:18:51 -04:00
parent 9f5737eb93
commit e6f59b834f
2 changed files with 4 additions and 2 deletions

View File

@@ -12,12 +12,14 @@ import Link from './Link';
* active.
* - `href` The URL to link to. If the current URL `m.route()` matches this,
* the `active` prop will automatically be set to true.
* - `force` Whether the page should be fully rerendered. Defaults to `true`.
*/
export default class LinkButton extends Button {
static initAttrs(attrs) {
super.initAttrs(attrs);
attrs.active = this.isActive(attrs);
if (attrs.force === undefined) attrs.force = true;
}
view(vnode) {