@tagplus/components 2.1.13 → 2.1.15

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.
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "email": "bruno@tagplus.com.br"
9
9
  }
10
10
  ],
11
- "version": "2.1.13",
11
+ "version": "2.1.15",
12
12
  "main": "./dist/tp.common.js",
13
13
  "directories": {
14
14
  "lib": "src/lib"
@@ -522,11 +522,8 @@ export default {
522
522
  if (Array.isArray(this.value)) {
523
523
  this.value.forEach((item, key) => {
524
524
  this.suggestionsList.forEach(suggestion => {
525
- // Formatando item e suggestion para int, caso os valores sejam inteiros e tenham sido enviados como string. Para que o if funcione.
526
- const formatItem = parseInt(item) ? parseInt(item) : item
527
- const formatSuggestion = parseInt(suggestion[this.valueKey]) ? parseInt(suggestion[this.valueKey]) : suggestion[this.valueKey]
528
-
529
- if (formatSuggestion === formatItem && !this.selectedLabelsArray.includes(suggestion)) {
525
+ // Valida se o item passado e o suggest são iguais e se a label ja nao foi adicionada
526
+ if (item === suggestion[this.valueKey] && !this.selectedLabelsArray.includes(suggestion)) {
530
527
  this.selectedLabelsArray.push(suggestion)
531
528
  }
532
529
  })