Skip to content

Commit 1a83dab

Browse files
committed
thats why you use build steps
1 parent 605e01d commit 1a83dab

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## v0.2.1 - 2024-08-26
4+
5+
- FIX: `switch-control` raw file out-of-date 🙈
6+
37
## v0.2.0 - 2024-08-26
48

59
- BREAKING: Export named classes from `index.js` module

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ Make sure you include the `<script>` in your project
9292
<!-- 3rd party CDN, not recommended for production use -->
9393
<script
9494
type="module"
95-
src="https://www.unpkg.com/@terriblemia/[email protected].0/index.js"
95+
src="https://www.unpkg.com/@terriblemia/[email protected].1/index.js"
9696
></script>
9797
```
9898

9999
```html
100100
<!-- 3rd party CDN, not recommended for production use -->
101101
<script
102102
type="module"
103-
src="https://esm.sh/@terriblemia/[email protected].0"
103+
src="https://esm.sh/@terriblemia/[email protected].1"
104104
></script>
105105
```
106106

ground-control-raw.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class GroundControl extends HTMLElement {
2828
template.innerHTML = `<slot></slot>`;
2929
shadowRoot.appendChild(template.content.cloneNode(true));
3030
};
31+
3132
static _adoptShadowStyles = (node) => {
3233
const shadowStyle = new CSSStyleSheet();
3334
shadowStyle.replaceSync(`:host { display: block }`);

ground-control.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export default class GroundControl extends HTMLElement {
2828
template.innerHTML = `<slot></slot>`;
2929
shadowRoot.appendChild(template.content.cloneNode(true));
3030
};
31+
3132
static _adoptShadowStyles = (node) => {
3233
const shadowStyle = new CSSStyleSheet();
3334
shadowStyle.replaceSync(`:host { display: block }`);

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@terriblemia/ground-control",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "A Web Component for user control of HTML attributes and CSS properties",
55
"main": "index.js",
66
"scripts": {

switch-control-raw.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class SwitchControl extends GroundControl {
5353
get pressedValue() {
5454
return this.pressed
5555
? this.dataset.on
56-
: this.dataset.off;
56+
: this.dataset.off || 'false';
5757
};
5858

5959
constructor() {
@@ -75,7 +75,11 @@ class SwitchControl extends GroundControl {
7575
connectedCallback() {
7676
super.connectedCallback();
7777
this.#findToggle();
78-
this.pressed = this.#isPressedValue(this.storedValue);
78+
79+
if (this.storedValue) {
80+
this.pressed = this.#isPressedValue(this.storedValue);
81+
}
82+
7983
this.doToggleActions();
8084
};
8185

0 commit comments

Comments
 (0)