= null) {
                        resolve(null);
                    }

                    const transaction = db.transaction(['tensors'], 'readwrite');
                    const store = transaction.objectStore('tensors');
                    const request = store.put({ id: id, content: tensor });

                    transaction.onabort = (event) => {
                        console.log("Transaction error while saving tensor: " + event.target.error);
                        resolve(null);
                