File tree 1 file changed +8
-2
lines changed
packages/apidom-core/src/transformers
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,14 @@ import defaultNamespaceInstance from '../namespace';
6
6
7
7
/**
8
8
* Transforms data to an Element from a particular namespace.
9
+ *
10
+ * The name of the function was originally `from`,
11
+ * but it was renamed to `fromFn` to avoid issues with Parcel.js:
12
+ *
13
+ * - https://github.com/parcel-bundler/parcel/issues/9473
14
+ * - https://github.com/swagger-api/swagger-ui/issues/9466#issuecomment-1881053410
9
15
*/
10
- const from = ( data : any , namespace : INamespace = defaultNamespaceInstance ) : Element => {
16
+ const fromFn = ( data : any , namespace : INamespace = defaultNamespaceInstance ) : Element => {
11
17
if ( isString ( data ) ) {
12
18
// JSON serialized refract
13
19
try {
@@ -24,4 +30,4 @@ const from = (data: any, namespace: INamespace = defaultNamespaceInstance): Elem
24
30
return namespace . toElement ( data ) ;
25
31
} ;
26
32
27
- export default from ;
33
+ export default fromFn ;
You can’t perform that action at this time.
0 commit comments