node_modules/preact/compat/src/Children.js in isomorfeus-preact-10.6.14 vs node_modules/preact/compat/src/Children.js in isomorfeus-preact-10.6.15

- old
+ new

@@ -1,21 +1,21 @@ -import { toChildArray } from 'preact'; - -const mapFn = (children, fn) => { - if (children == null) return null; - return toChildArray(toChildArray(children).map(fn)); -}; - -// This API is completely unnecessary for Preact, so it's basically passthrough. -export const Children = { - map: mapFn, - forEach: mapFn, - count(children) { - return children ? toChildArray(children).length : 0; - }, - only(children) { - const normalized = toChildArray(children); - if (normalized.length !== 1) throw 'Children.only'; - return normalized[0]; - }, - toArray: toChildArray -}; +import { toChildArray } from 'preact'; + +const mapFn = (children, fn) => { + if (children == null) return null; + return toChildArray(toChildArray(children).map(fn)); +}; + +// This API is completely unnecessary for Preact, so it's basically passthrough. +export const Children = { + map: mapFn, + forEach: mapFn, + count(children) { + return children ? toChildArray(children).length : 0; + }, + only(children) { + const normalized = toChildArray(children); + if (normalized.length !== 1) throw 'Children.only'; + return normalized[0]; + }, + toArray: toChildArray +};