mirror of
https://github.com/Kenshin/simpread.git
synced 2026-02-01 15:41:29 +00:00
Fix plugin.enable undefined bug.
This commit is contained in:
parent
1a3babd974
commit
555f3a5eac
@ -25,6 +25,7 @@ export default class Pluginbar extends React.Component {
|
||||
}
|
||||
|
||||
enable( id ) {
|
||||
console.log( id, storage.plugins[id].enable )
|
||||
const plugin = storage.plugins[id];
|
||||
plugin.enable = !plugin.enable;
|
||||
storage.Plugins( () => {
|
||||
@ -47,6 +48,7 @@ export default class Pluginbar extends React.Component {
|
||||
|
||||
const actions = this.category[item].map( plugin => {
|
||||
const bgColor = ( plugin.enable == undefined || plugin.enable == true ) ? plugin.icon.bgColor : "#c3c6c7";
|
||||
plugin.enable == undefined && ( plugin.enable = true );
|
||||
return (
|
||||
<Button ref={plugin.id}
|
||||
shape="circle" type="flat"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user