Fix space, add trim warning (fix #85)
This commit is contained in:
parent
dd8f5e549e
commit
7d65c84513
2 changed files with 10 additions and 2 deletions
|
@ -3,7 +3,8 @@ import Translations from "../../../UI/i18n/Translations";
|
||||||
import {TagRenderingOptions} from "../../TagRenderingOptions";
|
import {TagRenderingOptions} from "../../TagRenderingOptions";
|
||||||
|
|
||||||
|
|
||||||
export default class PumpValves extends TagRenderingOptions{
|
export default class
|
||||||
|
PumpValves extends TagRenderingOptions{
|
||||||
constructor() {
|
constructor() {
|
||||||
const to = Translations.t.cyclofix.station.valves
|
const to = Translations.t.cyclofix.station.valves
|
||||||
super({
|
super({
|
||||||
|
|
|
@ -64,6 +64,13 @@ export class Changes {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(key.startsWith(" ") || value.startsWith(" ") || value.endsWith(" ") || key.endsWith(" ")){
|
||||||
|
console.warn("Tag starts with or ends with a space - trimming anyway")
|
||||||
|
}
|
||||||
|
|
||||||
|
key = key.trim();
|
||||||
|
value = value.trim();
|
||||||
|
|
||||||
const eventSource = State.state.allElements.getElement(elementId);
|
const eventSource = State.state.allElements.getElement(elementId);
|
||||||
|
|
||||||
eventSource.data[key] = value;
|
eventSource.data[key] = value;
|
||||||
|
|
Loading…
Reference in a new issue