mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 08:26:40 +00:00
* actually using result from deepMerge when updating settings * replacing merge from lodash with merge from deepmerge --------- Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This commit is contained in:
committed by
GitHub
parent
10caacd830
commit
5e1117ef92
@@ -2,7 +2,7 @@ import { SettingSchemaDesc, StyleString, UIOptions } from './LSPlugin'
|
||||
import { PluginLocal } from './LSPlugin.core'
|
||||
import * as nodePath from 'path'
|
||||
import DOMPurify from 'dompurify'
|
||||
import { merge } from 'lodash-es'
|
||||
import merge from 'deepmerge';
|
||||
import { snakeCase } from 'snake-case'
|
||||
import * as callables from './callable.apis'
|
||||
import EventEmitter from 'eventemitter3'
|
||||
@@ -52,7 +52,10 @@ export function isObject(item: any) {
|
||||
return item === Object(item) && !Array.isArray(item)
|
||||
}
|
||||
|
||||
export const deepMerge = merge
|
||||
export function deepMerge<T>(a: Partial<T>, b: Partial<T>): T {
|
||||
const overwriteArrayMerge = (destinationArray, sourceArray) => sourceArray
|
||||
return merge(a, b, { arrayMerge: overwriteArrayMerge })
|
||||
}
|
||||
|
||||
export class PluginLogger extends EventEmitter<'change'> {
|
||||
private _logs: Array<[type: string, payload: any]> = []
|
||||
|
||||
Reference in New Issue
Block a user