Add check to avoid empty lines
This commit is contained in:
parent
cfc41309ec
commit
e32f22a387
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Reference in New Issue