Skip to content

Commit

Permalink
fixed untracked files
Browse files Browse the repository at this point in the history
  • Loading branch information
fikyair committed Jul 23, 2021
1 parent e46aece commit b5ccd6c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/chromatic.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@
.env.local
.env.development.local
.env.test.local
.env.production.local
.env.production.local

#git action
/.github
28 changes: 28 additions & 0 deletions src/utils/clone.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* @Description:
* @Author: Xue Shiming
* @Date: 2021-07-18 12:29:46
* @GitLab: [email protected]:he_xia/gascard-app.git
* @LastEditors: Xue Shiming
* @LastEditTime: 2021-07-18 12:29:47
*/
const clone = (obj: any) => {
if (!obj || typeof obj !== 'object') {
return
}
var newObj: any = obj.constructor === Array ? [] : {}
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === 'object') {
if (key !== 'parent') {
newObj[key] = clone(obj[key])
}
} else {
newObj[key] = obj[key]
}
}
}
return newObj
}

export default clone;

0 comments on commit b5ccd6c

Please sign in to comment.