Skip to content

Commit

Permalink
Merge pull request edp963#1780 from scottsut/fix_array_flat
Browse files Browse the repository at this point in the history
fix: Array.flat compatibility of dependencies
  • Loading branch information
AndyFong authored Jun 1, 2020
2 parents b43cffd + 9d2f8f0 commit 2bc5a78
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions webapp/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import '@babel/polyfill'
import 'url-search-params-polyfill'
import 'array-flat-polyfill'

import React from 'react'
import ReactDOM from 'react-dom'
Expand Down
4 changes: 1 addition & 3 deletions webapp/app/components/RichText/Serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ export const deserialize = (el: HTMLElement): Node[] => {
parent = el.childNodes[0]
}

const children: any[] = Array.from(parent.childNodes)
.map(deserialize)
.reduce((acc, child) => acc.concat(child), [])
const children: any[] = Array.from(parent.childNodes).map(deserialize).flat()

if (el.nodeName === 'BODY') {
return jsx('fragment', {}, children)
Expand Down
1 change: 1 addition & 0 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"@babel/polyfill": "^7.8.3",
"ace-builds": "^1.4.9",
"antd": "^3.26.15",
"array-flat-polyfill": "^1.0.1",
"axios": "^0.19.0",
"bootstrap-datepicker": "^1.8.0",
"chalk": "2.4.2",
Expand Down
1 change: 1 addition & 0 deletions webapp/share/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import '@babel/polyfill'
import 'url-search-params-polyfill'
import 'array-flat-polyfill'

import React from 'react'
import ReactDOM from 'react-dom'
Expand Down

0 comments on commit 2bc5a78

Please sign in to comment.