mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 16:26:30 +00:00
refactor(gui): linting
Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
// Todo : https://jasonwatmore.com/post/2018/09/10/vuejs-set-get-delete-reactive-nested-object-properties
|
||||
import Vue from 'vue'
|
||||
|
||||
function setProp(obj, props, value) {
|
||||
function setProp (obj, props, value) {
|
||||
const prop = props.shift()
|
||||
if (!obj[prop]) {
|
||||
Vue.set(obj, prop, {})
|
||||
} else {
|
||||
Vue.set(obj, prop, {...obj[prop]})
|
||||
Vue.set(obj, prop, { ...obj[prop] })
|
||||
}
|
||||
|
||||
if (!props.length) {
|
||||
if (value && typeof value === 'object') {
|
||||
obj[prop] = Array.isArray(value) ? [...value] : {...obj[prop], ...value}
|
||||
obj[prop] = Array.isArray(value) ? [...value] : { ...obj[prop], ...value }
|
||||
} else {
|
||||
obj[prop] = value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user