Add check to avoid empty lines

This commit is contained in:
Alex Piqueras 2024-10-11 15:16:21 +02:00
parent cfc41309ec
commit e32f22a387
2 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,6 @@ class AppBase extends HTMLElement {
<path d="M.681 2.22a2.38 2.38 0 0 1 4.742.294v0a2.38 2.38 0 0 1-4.526 1.03" style="fill:none;stroke:${this.properties.color};stroke-width:.264583;stroke-linecap:round;stroke-dasharray:none"/>
<path d="m.132 1.525.437.964.964-.437" style="fill:none;stroke:${this.properties.color};stroke-width:.264583;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"/>
</svg>
</button>
<button is="custom-button" action="${Store.actions.REMOVE_LINE}" outline width="124px" color="${this.properties.color}">Delete</button>
<button is="custom-button" class="right-button" action="${Store.actions.OPEN_MODAL}" width="138px" color="${this.properties.color}">Add</button>

View File

@ -43,6 +43,7 @@ export default class Store {
switch (event.type) {
case this.constructor.actions.ADD_LINE:
if (!this.state.input) break;
this.state = {
...this.state,
records: this.state.records.concat({