@taiga-ui/addon-doc 2.44.0 → 2.45.0

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.
@@ -882,7 +882,7 @@
882
882
  }
883
883
  var lastComma = color.lastIndexOf(',');
884
884
  var parsed = color
885
- .substr(lastComma)
885
+ .slice(lastComma)
886
886
  .replace(')', '')
887
887
  .replace(' ', '')
888
888
  .replace(',', '');
@@ -1121,7 +1121,7 @@
1121
1121
  TuiDocExampleComponent.prototype.copyExampleLink = function () {
1122
1122
  var hashPosition = this.location.href.indexOf('#');
1123
1123
  var currentUrl = hashPosition > -1
1124
- ? this.location.href.substr(0, hashPosition)
1124
+ ? this.location.href.slice(0, Math.max(0, hashPosition))
1125
1125
  : this.location.href;
1126
1126
  var url = currentUrl + "#" + this.id;
1127
1127
  this.clipboard.copy(url);