solid-navigator 0.3.3 → 0.3.4

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/dist/dev.js CHANGED
@@ -163,8 +163,10 @@ function Router(props) {
163
163
  return;
164
164
  if (!target.hasAttribute("sn-link"))
165
165
  return;
166
- event.preventDefault();
167
166
  const href = target.getAttribute("href") || "";
167
+ if (href.startsWith("http://") || href.startsWith("https://"))
168
+ return;
169
+ event.preventDefault();
168
170
  navigate(href, {
169
171
  replace: target.hasAttribute("replace")
170
172
  });
package/dist/dev.jsx CHANGED
@@ -170,8 +170,10 @@ function Router(props) {
170
170
  return;
171
171
  if (!target.hasAttribute("sn-link"))
172
172
  return;
173
- event.preventDefault();
174
173
  const href = target.getAttribute("href") || "";
174
+ if (href.startsWith("http://") || href.startsWith("https://"))
175
+ return;
176
+ event.preventDefault();
175
177
  navigate(href, {
176
178
  replace: target.hasAttribute("replace")
177
179
  });
package/dist/index.js CHANGED
@@ -163,8 +163,10 @@ function Router(props) {
163
163
  return;
164
164
  if (!target.hasAttribute("sn-link"))
165
165
  return;
166
- event.preventDefault();
167
166
  const href = target.getAttribute("href") || "";
167
+ if (href.startsWith("http://") || href.startsWith("https://"))
168
+ return;
169
+ event.preventDefault();
168
170
  navigate(href, {
169
171
  replace: target.hasAttribute("replace")
170
172
  });
package/dist/index.jsx CHANGED
@@ -170,8 +170,10 @@ function Router(props) {
170
170
  return;
171
171
  if (!target.hasAttribute("sn-link"))
172
172
  return;
173
- event.preventDefault();
174
173
  const href = target.getAttribute("href") || "";
174
+ if (href.startsWith("http://") || href.startsWith("https://"))
175
+ return;
176
+ event.preventDefault();
175
177
  navigate(href, {
176
178
  replace: target.hasAttribute("replace")
177
179
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-navigator",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Solid Navigator is a library that is inspired by vue router and solid router.",
5
5
  "license": "MIT",
6
6
  "author": "SupertigerDev",