@solidjs/router
Advanced tools
Comparing version 0.10.6 to 0.10.7
@@ -69,4 +69,4 @@ import { $TRACK, createMemo, createSignal, onCleanup, getOwner } from "solid-js"; | ||
const url = fn.url || | ||
(name && `action:${name}`) || | ||
(!isServer ? `action:${hashString(fn.toString())}` : ""); | ||
(name && `https://action/${name}`) || | ||
(!isServer ? `https://action/${hashString(fn.toString())}` : ""); | ||
return toAction(mutate, url); | ||
@@ -86,3 +86,3 @@ } | ||
uri.searchParams.set("args", hashKey(args)); | ||
return toAction(newFn, (uri.protocol === "action:" ? uri.protocol : "") + uri.pathname + uri.search); | ||
return toAction(newFn, (uri.origin === "https://action" ? uri.origin : "") + uri.pathname + uri.search); | ||
}; | ||
@@ -89,0 +89,0 @@ fn.url = url; |
@@ -127,3 +127,3 @@ import { createSignal, getOwner, onCleanup, sharedConfig, startTransition } from "solid-js"; | ||
if (error) | ||
throw error; | ||
throw v; | ||
if (isServer) | ||
@@ -130,0 +130,0 @@ return v; |
@@ -90,3 +90,3 @@ import { delegateEvents } from "solid-js/web"; | ||
return; | ||
if (!actionRef.startsWith("action:")) { | ||
if (!actionRef.startsWith("https://action/")) { | ||
const url = new URL(actionRef); | ||
@@ -103,2 +103,4 @@ actionRef = router.parsePath(url.pathname + url.search); | ||
const data = new FormData(evt.target); | ||
if (evt.submitter && evt.submitter.name) | ||
data.append(evt.submitter.name, evt.submitter.value); | ||
handler.call(router, data); | ||
@@ -105,0 +107,0 @@ } |
@@ -881,3 +881,3 @@ import { isServer, getRequestEvent, createComponent as createComponent$1, delegateEvents, spread, mergeProps as mergeProps$1, template } from 'solid-js/web'; | ||
} | ||
if (error) throw error; | ||
if (error) throw v; | ||
if (isServer) return v; | ||
@@ -992,3 +992,3 @@ setStore(key, reconcile(v, options)); | ||
} | ||
const url = fn.url || name && `action:${name}` || (!isServer ? `action:${hashString(fn.toString())}` : ""); | ||
const url = fn.url || name && `https://action/${name}` || (!isServer ? `https://action/${hashString(fn.toString())}` : ""); | ||
return toAction(mutate, url); | ||
@@ -1007,3 +1007,3 @@ } | ||
uri.searchParams.set("args", hashKey(args)); | ||
return toAction(newFn, (uri.protocol === "action:" ? uri.protocol : "") + uri.pathname + uri.search); | ||
return toAction(newFn, (uri.origin === "https://action" ? uri.origin : "") + uri.pathname + uri.search); | ||
}; | ||
@@ -1104,3 +1104,3 @@ fn.url = url; | ||
if (!actionRef) return; | ||
if (!actionRef.startsWith("action:")) { | ||
if (!actionRef.startsWith("https://action/")) { | ||
const url = new URL(actionRef); | ||
@@ -1115,2 +1115,3 @@ actionRef = router.parsePath(url.pathname + url.search); | ||
const data = new FormData(evt.target); | ||
if (evt.submitter && evt.submitter.name) data.append(evt.submitter.name, evt.submitter.value); | ||
handler.call(router, data); | ||
@@ -1117,0 +1118,0 @@ } |
@@ -9,3 +9,3 @@ { | ||
"license": "MIT", | ||
"version": "0.10.6", | ||
"version": "0.10.7", | ||
"homepage": "https://github.com/solidjs/solid-router#readme", | ||
@@ -12,0 +12,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148939
3259