TypeError: Cannot add property 1, object is not extensible↵ at Array.push ()

Make a copy of object using the Object.assign method and try again,

this.collectionPages = Object.assign([], this.collectionPages);
this.collectionPages.push(collectionPageDbModel);

ES6 simplified code would be,

this.collectionPages = [...this.collectionPages, collectionPageDbModel]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)