(theme)
| 147 | * @param {ThemeBuilder} theme |
| 148 | */ |
| 149 | export function update(theme) { |
| 150 | if (!(theme instanceof ThemeBuilder)) return; |
| 151 | const oldTheme = get(theme.id); |
| 152 | if (!oldTheme) { |
| 153 | add(theme); |
| 154 | return; |
| 155 | } |
| 156 | const json = theme.toJSON(); |
| 157 | Object.keys(json).forEach((key) => { |
| 158 | oldTheme[key] = json[key]; |
| 159 | }); |
| 160 | } |
| 161 | |
| 162 | export default { |
| 163 | get applied() { |