postal-mime 2.2.1 → 2.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.2](https://github.com/postalsys/postal-mime/compare/v2.2.1...v2.2.2) (2024-04-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **parse:** Do not throw on empty input when initializing an array buffer object ([ddae5b4](https://github.com/postalsys/postal-mime/commit/ddae5b40d44eaebbfc9117609259a204f27ed4cf))
9
+
3
10
  ## [2.2.1](https://github.com/postalsys/postal-mime/compare/v2.2.0...v2.2.1) (2024-03-31)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postal-mime",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Email parser for browser environments",
5
5
  "main": "./src/postal-mime.js",
6
6
  "exports": {
@@ -328,7 +328,7 @@ export default class PostalMime {
328
328
  }
329
329
 
330
330
  // Should it throw for an empty value instead of defaulting to an empty ArrayBuffer?
331
- buf = buf || ArrayBuffer(0);
331
+ buf = buf || new ArrayBuffer(0);
332
332
 
333
333
  // Cast string input to Uint8Array
334
334
  if (typeof buf === 'string') {