@fulate/import 1.0.9 → 1.0.11

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -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 && Object.prototype.hasOwnProperty.call(factories, normalized)) custom = factories[normalized];
698
+ else if (factories && has(factories, [normalized])) custom = factories[normalized];
699
699
  return custom ?? builtInFactories[normalized];
700
700
  }
701
701
  function serializeScene(root, filter) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fulate/import",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",