@fulate/import 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Element, Layer, Shape } from "@fulate/core";
|
|
2
2
|
import { Circle, Group, Image, Line, LineTree, Polygon, Rectangle, RippleOverlay, ScrollView, Text, Triangle, VectorPath, Workspace } from "@fulate/ui";
|
|
3
3
|
import { loadAsync } from "jszip";
|
|
4
|
-
import { isNil, isUndefined } from "lodash-es";
|
|
4
|
+
import { has, isNil, isUndefined } from "lodash-es";
|
|
5
5
|
//#region packages/import/src/sketch/parser.ts
|
|
6
6
|
async function parseSketchFile(data) {
|
|
7
7
|
const zip = await loadAsync(data instanceof File ? await data.arrayBuffer() : data);
|
|
@@ -695,7 +695,7 @@ function resolveFactory(type, factories) {
|
|
|
695
695
|
const normalized = normalizeType(type);
|
|
696
696
|
let custom;
|
|
697
697
|
if (factories instanceof Map) custom = factories.get(normalized);
|
|
698
|
-
else if (factories &&
|
|
698
|
+
else if (factories && has(factories, [normalized])) custom = factories[normalized];
|
|
699
699
|
return custom ?? builtInFactories[normalized];
|
|
700
700
|
}
|
|
701
701
|
function serializeScene(root, filter) {
|