@symbo.ls/atoms 2.11.352 → 2.11.353

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/Img.js +4 -2
  2. package/package.json +2 -2
package/Img.js CHANGED
@@ -6,11 +6,13 @@ export const Img = {
6
6
  attr: {
7
7
  src: ({ props, context }) => {
8
8
  const src = props.src
9
- const file = context.files[src]
9
+ let isUrl
10
+ try { isUrl = new URL(src) } catch (e) {}
11
+ if (isUrl) return src
12
+ const file = context.files && context.files[src]
10
13
  if (src.startsWith('/') && file) {
11
14
  return file.content.src
12
15
  }
13
- return src
14
16
  },
15
17
  alt: ({ props }) => props.alt,
16
18
  title: ({ props }) => props.title || props.alt
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.352",
3
+ "version": "2.11.353",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "c294479f06e6f576951c7c1cb3df309a08d59dc4",
6
+ "gitHead": "c5d01a30797fc044b539a5309a879f6b249e3888",
7
7
  "dependencies": {
8
8
  "@domql/state": "latest",
9
9
  "@domql/utils": "latest",