@pageboard/html 0.15.12 → 0.15.13

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/package.json +1 -1
  2. package/ui/layout.js +1 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.15.12",
3
+ "version": "0.15.13",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
package/ui/layout.js CHANGED
@@ -16,11 +16,6 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
16
16
  }
17
17
  const srcLoc = Page.parse(this.options.src);
18
18
  const reqSrc = this.requestSrc(srcLoc);
19
- try {
20
- this.currentSrc = reqSrc;
21
- } catch (e) {
22
- // pass
23
- }
24
19
  if (!reqSrc) {
25
20
  this.style.backgroundImage = '';
26
21
  } else if (reqSrc != this.currentSrc) {
@@ -31,7 +26,7 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
31
26
  img.addEventListener('error',
32
27
  e => this.#defer.reject(new Error(this.currentSrc))
33
28
  );
34
- img.src = reqSrc;
29
+ img.src = this.currentSrc = reqSrc;
35
30
  this.style.backgroundImage = `url("${reqSrc}")`;
36
31
  return this.#defer;
37
32
  }