@manyducks.co/dolla 0.68.0 → 0.68.1
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/lib/index.js +10 -3
- package/lib/index.js.map +2 -2
- package/lib/state.d.ts +1 -1
- package/lib/views/store-scope.d.ts +3 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -787,6 +787,13 @@ function computed(...args) {
|
|
|
787
787
|
let lastObservedValue;
|
|
788
788
|
return readable2[OBSERVE]((currentValue) => {
|
|
789
789
|
const computedValue = compute(currentValue, lastObservedValue);
|
|
790
|
+
if (isReadable(computedValue)) {
|
|
791
|
+
lastComputedValue = computedValue;
|
|
792
|
+
return computedValue[OBSERVE]((current, previous) => {
|
|
793
|
+
callback(current, previous);
|
|
794
|
+
lastObservedValue = current;
|
|
795
|
+
});
|
|
796
|
+
}
|
|
790
797
|
if (!deepEqual(computedValue, lastComputedValue)) {
|
|
791
798
|
const previousValue = lastComputedValue === UNOBSERVED ? void 0 : lastComputedValue;
|
|
792
799
|
callback(computedValue, previousValue);
|
|
@@ -2572,7 +2579,7 @@ async function makeRequest(config) {
|
|
|
2572
2579
|
let response;
|
|
2573
2580
|
const handler = async () => {
|
|
2574
2581
|
const query2 = request.query.toString();
|
|
2575
|
-
const fullURL =
|
|
2582
|
+
const fullURL = query2.length > 0 ? request.uri + "?" + query2 : request.uri;
|
|
2576
2583
|
let reqBody;
|
|
2577
2584
|
if (!request.headers.has("content-type") && isObject(request.body)) {
|
|
2578
2585
|
request.headers.set("content-type", "application/json");
|
|
@@ -3364,7 +3371,7 @@ function RouterStore(ctx) {
|
|
|
3364
3371
|
const $$path = writable("");
|
|
3365
3372
|
const $$params = writable({});
|
|
3366
3373
|
const $$query = writable({});
|
|
3367
|
-
let isRouteChange =
|
|
3374
|
+
let isRouteChange = true;
|
|
3368
3375
|
ctx.observe($$query, (current) => {
|
|
3369
3376
|
if (isRouteChange) {
|
|
3370
3377
|
isRouteChange = false;
|
|
@@ -3396,7 +3403,7 @@ function RouterStore(ctx) {
|
|
|
3396
3403
|
if (location.search !== lastQuery) {
|
|
3397
3404
|
lastQuery = location.search;
|
|
3398
3405
|
isRouteChange = true;
|
|
3399
|
-
$$query.set(parseQueryParams(location.search));
|
|
3406
|
+
$$query.set(parseQueryParams(location.search.startsWith("?") ? location.search.slice(1) : location.search));
|
|
3400
3407
|
}
|
|
3401
3408
|
const matched = matchRoutes(ctx.options.routes, location.pathname);
|
|
3402
3409
|
if (!matched) {
|