@symbo.ls/link 2.11.8 → 2.11.11

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/index.js +5 -4
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -32,13 +32,14 @@ export const RouterLink = {
32
32
  const { router } = utils
33
33
  const root = el.__ref.__root
34
34
  const { href } = props
35
- const linkIsExternal = href.includes('mailto') ||
36
- href.includes('http') ||
37
- href.includes('tel')
35
+ const linkIsExternal = href.includes('http://') ||
36
+ href.includes('https://') ||
37
+ href.includes('mailto:') ||
38
+ href.includes('tel:')
38
39
  const options = props.routerOptions || routerOptions || {
39
40
  scrollToOptions: { behaviour: 'instant' }
40
41
  }
41
- if (href && linkIsExternal) {
42
+ if (href && !linkIsExternal) {
42
43
  (router || defaultRouter)(href, root, {}, options)
43
44
  event.preventDefault()
44
45
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/link",
3
- "version": "2.11.8",
3
+ "version": "2.11.11",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "ebb08006600f7b87c1d571491f5fb7b4220acbdd",
6
+ "gitHead": "23e0c6c10317ec882e029eb40230d5b5249ca935",
7
7
  "dependencies": {
8
8
  "@domql/router": "latest",
9
9
  "@symbo.ls/atoms": "latest"