@pageboard/html 0.14.17 → 0.14.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.14.17",
3
+ "version": "0.14.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
package/ui/image.js CHANGED
@@ -157,7 +157,7 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
157
157
  this.classList.remove('loading');
158
158
  }
159
159
  captureError(e) {
160
- this.#defer.reject(new Error(this.currentSrc));
160
+ this.#defer.reject(e);
161
161
  this.classList.remove('loading');
162
162
  this.classList.add('error');
163
163
  this.placeholder(true);
package/ui/layout.js CHANGED
@@ -60,7 +60,7 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
60
60
  this.#defer = new Deferred();
61
61
  const img = new Image();
62
62
  img.addEventListener('load', this.#defer.resolve);
63
- img.addEventListener('error', e => this.#defer.reject(new Error(this.currentSrc)));
63
+ img.addEventListener('error', this.#defer.reject);
64
64
  img.src = curSrc;
65
65
  this.style.backgroundImage = `url("${curSrc}")`;
66
66
  return this.#defer;