mirror of
https://github.com/flarum/framework.git
synced 2025-05-21 22:36:01 +08:00
Prevent incorrect badge redraw diffing
This commit is contained in:
@ -6,10 +6,12 @@ export default class Badge extends Component {
|
||||
var iconName = this.props.icon;
|
||||
var label = this.props.title = this.props.label;
|
||||
delete this.props.icon, this.props.label;
|
||||
this.props.config = function(element) {
|
||||
this.props.config = function(element, isInitialized) {
|
||||
if (isInitialized) return;
|
||||
$(element).tooltip();
|
||||
};
|
||||
this.props.className = 'badge '+(this.props.className || '');
|
||||
this.props.key = this.props.className;
|
||||
|
||||
return m('span', this.props, [
|
||||
icon(iconName+' icon-glyph'),
|
||||
|
Reference in New Issue
Block a user