Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
Property of object inside indexedDB showing a value, when retrieved showing another

In chrome "Application" -> IndexedDB I see the property value of an object with value "inactive", on retrieving that record, the property shows with value "active".

This is the function that does the retrieving:

function retrievesClientsFrom(databaseWithThisName, thisVersion, thisObjectStoreName) {
  var requestToOpenDatabase = indexedDB.open(databaseWithThisName, thisVersion);

  requestToOpenDatabase.onsuccess = function(event) {
    var theDatabaseObject = requestToOpenDatabase.result;

    //gets a transaction object
    var theTransactionObject = theDatabaseObject.transaction(thisObjectStoreName, "readonly");

    //gets the object store with that name
    var theObjectStore = theTransactionObject.objectStore(thisObjectStoreName);

    //gets all objects inside the objectStore sent to the function
    var requestToGetContentOfAnObjectStore = theObjectStore.getAll();
    requestToGetContentOfAnObjectStore.onsuccess = function(event) {
      arrayOfRetrievedClients = requestToGetContentOfAnObjectStore.result;
      //here I get the wrong value (I see it in chrome console).
      console.log("arrayOfRetrievedClients: o%",arrayOfRetrievedClients); 
    };
  };

  requestToOpenDatabase.onerror = function(event) {
    window.alert("There was a problem reading the database: 
      "+requestToOpenDatabase.error);
  };
}

I have absolutely no idea what to do. Any ideas?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda