Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

390
Visualizações
ERROR TypeError: Cannot add property 0, object is not extensible

I know this question appears several times. But didn't found solution for my app. I'm coding a function to color user avatars based on their name initials.

color = this.hashStringToColor(id);

this returns a color. then i push it into an array.

this.colorsByUser.push({
     color: color,
     id: id
});

this array is declared at the beginning in this way:

colorsByUser: IProfileColors[] = [];

IProfileColors is an interface and contains just color and id. As you see, nothing special is here but i have this weird error that i infer that means i cannot add nothing to the array. Is the first time i face it. Any ideas? Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda