asap-feed-beta 12.6.0 → 12.6.1

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.
@@ -7026,18 +7026,20 @@
7026
7026
  * @return {?}
7027
7027
  */
7028
7028
  function (selected) {
7029
- /** @type {?} */
7030
- var value = this.input.value;
7031
- /** @type {?} */
7032
- var shift = 1 + selected.name.length - this.mark.length;
7033
- this.input.value = value.substring(0, this.startPosition) + ("@" + selected.name) + value.substring(this.endPosition);
7034
- /** @type {?} */
7035
- var evento = new Event('input');
7036
- this.input.dispatchEvent(evento);
7037
- this.userSelected.emit(selected);
7038
- this.input.selectionStart = this.endPosition + shift;
7039
- this.input.selectionEnd = this.endPosition + shift;
7040
- this.input.focus();
7029
+ if (this.input) {
7030
+ /** @type {?} */
7031
+ var value = this.input.value;
7032
+ /** @type {?} */
7033
+ var shift = 1 + selected.name.length - this.mark.length;
7034
+ this.input.value = value.substring(0, this.startPosition) + ("@" + selected.name) + value.substring(this.endPosition);
7035
+ /** @type {?} */
7036
+ var evento = new Event('input');
7037
+ this.input.dispatchEvent(evento);
7038
+ this.userSelected.emit(selected);
7039
+ this.input.selectionStart = this.endPosition + shift;
7040
+ this.input.selectionEnd = this.endPosition + shift;
7041
+ this.input.focus();
7042
+ }
7041
7043
  };
7042
7044
  /**
7043
7045
  * @param {?} position
@@ -7050,12 +7052,12 @@
7050
7052
  function (position) {
7051
7053
  /** @type {?} */
7052
7054
  var cursorPosition = position;
7053
- /** @type {?} */
7054
- var phrase = this.input.value;
7055
- if (cursorPosition === 0) {
7055
+ if (!this.input || !this.input.value || cursorPosition === 0) {
7056
7056
  return "";
7057
7057
  }
7058
7058
  /** @type {?} */
7059
+ var phrase = this.input.value;
7060
+ /** @type {?} */
7059
7061
  var words = phrase.split(' ');
7060
7062
  /** @type {?} */
7061
7063
  var startPosition = 0;
@@ -7069,7 +7071,7 @@
7069
7071
  this.endPosition = endPosition;
7070
7072
  return words[i];
7071
7073
  }
7072
- return null;
7074
+ return "";
7073
7075
  }
7074
7076
  startPosition = endPosition + 1;
7075
7077
  endPosition = startPosition;