瀏覽代碼

fix: Use Array.from when spreading over set so that typescript transpiles correctly in the umd build (#3165)

* fix: Use Array.from when spreading over set so that typescript transpiles correctly in the umd build

* patch version

* fix

* update changelog

* tweak
Aakansha Doshi 4 年之前
父節點
當前提交
3d1cbf444d
共有 3 個文件被更改,包括 25 次插入4 次删除
  1. 3 3
      src/element/binding.ts
  2. 21 0
      src/packages/excalidraw/CHANGELOG.md
  3. 1 1
      src/packages/excalidraw/package.json

+ 3 - 3
src/element/binding.ts

@@ -182,9 +182,9 @@ const bindLinearElement = (
     } as PointBinding,
   });
   mutateElement(hoveredElement, {
-    boundElementIds: [
-      ...new Set([...(hoveredElement.boundElementIds ?? []), linearElement.id]),
-    ],
+    boundElementIds: Array.from(
+      new Set([...(hoveredElement.boundElementIds ?? []), linearElement.id]),
+    ),
   });
 };
 

+ 21 - 0
src/packages/excalidraw/CHANGELOG.md

@@ -12,6 +12,27 @@ The change should be grouped under one of the below section and must contain PR
 Please add the latest change on the top under the correct section.
 -->
 
+## 0.4.1
+
+## Excalidraw API
+
+### Fixes
+
+- Use `Array.from` when spreading over set so that typescript transpiles correctly in the umd build[#3165](https://github.com/excalidraw/excalidraw/pull/3165).
+
+## Excalidraw Library
+
+### Features
+
+- Add export info on copy PNG to clipboard toast message [#3159](https://github.com/excalidraw/excalidraw/pull/3159).
+- Use the latest version of Virgil [#3124](https://github.com/excalidraw/excalidraw/pull/3124).
+- Support exporting with dark mode [#3046](https://github.com/excalidraw/excalidraw/pull/3046).
+
+### Fixes
+
+- Cursor being leaked outside of canvas [#3161](https://github.com/excalidraw/excalidraw/pull/3161).
+- Hide scrollbars in zenMode [#3144](https://github.com/excalidraw/excalidraw/pull/3144).
+
 ## 0.4.0
 
 ## Excalidraw API

+ 1 - 1
src/packages/excalidraw/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@excalidraw/excalidraw",
-  "version": "0.4.0",
+  "version": "0.4.1",
   "main": "dist/excalidraw.min.js",
   "files": [
     "dist/*"