gd-bs 6.0.7 → 6.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -196,16 +196,24 @@ var _Button = /** @class */ (function (_super) {
196
196
  // Sets the button text
197
197
  _Button.prototype.setText = function (btnText) {
198
198
  var elButton = this.el;
199
+ var existsFl = false;
199
200
  // Parse the child nodes
200
201
  for (var i = 0; i < elButton.childNodes.length; i++) {
201
202
  // See if this is the text element
202
203
  if (elButton.childNodes[i].nodeName == "#text") {
204
+ // Set the flag
205
+ existsFl = true;
203
206
  // Set the value
204
- elButton.childNodes[i].nodeValue = btnText;
207
+ elButton.childNodes[i].nodeValue = btnText || "";
205
208
  // Break from the loop
206
209
  break;
207
210
  }
208
211
  }
212
+ // See if it doesn't exist
213
+ if (!existsFl) {
214
+ // Add the text node
215
+ elButton.appendChild(document.createTextNode(btnText == null ? "" : btnText));
216
+ }
209
217
  };
210
218
  // Sets the button type
211
219
  _Button.prototype.setType = function (buttonType) {