I have the following code and don’t understand why the error occurs.
let kwText = "* " + this.wochenziel + " *";
kwSlot
.text(kwText)
.css("white-space", "nowrap")
.css("position", "relative")
.css("float", "left")
.appendTo(`.wochenziel[data-kwindex="0"`);
I can narrow down when the error occurs. Whenever there is a special character like
. ,
or
!
etc. at the end of the sentence, I get the error. Without a punctuation mark at the end, I don’t get the error.
The data comes from the database.
replace .text to .innerHTML
change the Variable Type
New contributor
Sascha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.