Skip to content

Commit

Permalink
data-ref bug (#333)
Browse files Browse the repository at this point in the history
* data-ref bug
Fixes #331

* Merge branch 'develop' of github.com:starfederation/datastar into delaneyj/issue331
  • Loading branch information
delaneyj authored Dec 9, 2024
1 parent 2fe3713 commit 4c20476
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 22 deletions.
2 changes: 1 addition & 1 deletion bundles/datastar-core.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bundles/datastar-core.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions bundles/datastar.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bundles/datastar.js.map

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion library/src/engine/nestedSignals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ export class SignalsRoot {
const last = parts[parts.length - 1];

const current = subSignals[last];
if (!!current) return current as Signal<T>;
if (!!current) {
if (current.value === null || current.value === undefined) {
current.value = value;
}
return current as Signal<T>;
}

const signal = new Signal(value);
subSignals[last] = signal;
Expand Down
4 changes: 2 additions & 2 deletions sdk/dotnet/src/Consts.fs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/go/consts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/php/src/Consts.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class Consts
{
public const DATASTAR_KEY = 'datastar';
public const VERSION = '0.21.0-beta2';
public const VERSION_CLIENT_BYTE_SIZE = 33705;
public const VERSION_CLIENT_BYTE_SIZE_GZIP = 12361;
public const VERSION_CLIENT_BYTE_SIZE = 33647;
public const VERSION_CLIENT_BYTE_SIZE_GZIP = 12356;

// The default duration for settling during merges. Allows for CSS transitions to complete.
public const DEFAULT_SETTLE_DURATION = 300;
Expand Down
2 changes: 1 addition & 1 deletion site/routes_home.templ
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

templ Home() {
{{
cdnText := `<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar/bundles/datastar.js"></script>`
cdnText := `<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@develop/bundles/datastar.js"></script>`
}}
{{
usageSample := `<input data-bind-title />
Expand Down

0 comments on commit 4c20476

Please sign in to comment.