@@ -160,8 +160,8 @@ const removeExtraneousData = transaction => new Promise(resolve => {
160160 */
161161const removeExtraneousRestorePoints = ( ) => openDB ( ) . then ( db => new Promise ( ( resolveTransaction , rejectTransaction ) => {
162162 const transaction = db . transaction ( ALL_STORES , 'readwrite' ) ;
163- transaction . onerror = ( ) => {
164- rejectTransaction ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
163+ transaction . onerror = event => {
164+ rejectTransaction ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
165165 } ;
166166
167167 // Figuring out which restore points to keep and which to remove is non-trivial.
@@ -310,8 +310,8 @@ const createRestorePoint = (
310310
311311 generateThumbnail ( vm ) . then ( thumbnailData => {
312312 const transaction = db . transaction ( ALL_STORES , 'readwrite' ) ;
313- transaction . onerror = ( ) => {
314- rejectTransaction ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
313+ transaction . onerror = event => {
314+ rejectTransaction ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
315315 } ;
316316
317317 // Will be generated by database
@@ -397,8 +397,8 @@ const createRestorePoint = (
397397 */
398398const deleteRestorePoint = id => openDB ( ) . then ( db => new Promise ( ( resolve , reject ) => {
399399 const transaction = db . transaction ( ALL_STORES , 'readwrite' ) ;
400- transaction . onerror = ( ) => {
401- reject ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
400+ transaction . onerror = event => {
401+ reject ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
402402 } ;
403403
404404 const metadataStore = transaction . objectStore ( METADATA_STORE ) ;
@@ -414,8 +414,8 @@ const deleteRestorePoint = id => openDB().then(db => new Promise((resolve, rejec
414414 */
415415const deleteAllRestorePoints = ( ) => openDB ( ) . then ( db => new Promise ( ( resolveTransaction , rejectTransaction ) => {
416416 const transaction = db . transaction ( ALL_STORES , 'readwrite' ) ;
417- transaction . onerror = ( ) => {
418- rejectTransaction ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
417+ transaction . onerror = event => {
418+ rejectTransaction ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
419419 } ;
420420
421421 const deleteEverything = async ( ) => {
@@ -448,8 +448,8 @@ const loadRestorePoint = (vm, id) => openDB().then(db => new Promise((resolvePro
448448 const storageHelper = {
449449 load : ( assetType , assetId , dataFormat ) => new Promise ( ( resolveFetch , rejectFetch ) => {
450450 const transaction = db . transaction ( [ ASSET_STORE ] , 'readonly' ) ;
451- transaction . onerror = ( ) => {
452- rejectFetch ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
451+ transaction . onerror = event => {
452+ rejectFetch ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
453453 } ;
454454
455455 const md5ext = `${ assetId } .${ dataFormat } ` ;
@@ -474,8 +474,8 @@ const loadRestorePoint = (vm, id) => openDB().then(db => new Promise((resolvePro
474474
475475 const loadProjectJSON = ( ) => {
476476 const transaction = db . transaction ( [ PROJECT_STORE ] , 'readonly' ) ;
477- transaction . onerror = ( ) => {
478- rejectProject ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
477+ transaction . onerror = event => {
478+ rejectProject ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
479479 } ;
480480
481481 const projectStore = transaction . objectStore ( PROJECT_STORE ) ;
@@ -508,8 +508,8 @@ const loadRestorePoint = (vm, id) => openDB().then(db => new Promise((resolvePro
508508 */
509509const getAllRestorePoints = ( ) => openDB ( ) . then ( db => new Promise ( ( resolve , reject ) => {
510510 const transaction = db . transaction ( [ METADATA_STORE ] , 'readonly' ) ;
511- transaction . onerror = ( ) => {
512- reject ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
511+ transaction . onerror = event => {
512+ reject ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
513513 } ;
514514
515515 /** @type {Metadata[] } */
@@ -552,8 +552,8 @@ const getAllRestorePoints = () => openDB().then(db => new Promise((resolve, reje
552552 */
553553const getThumbnail = id => openDB ( ) . then ( db => new Promise ( ( resolve , reject ) => {
554554 const transaction = db . transaction ( [ THUMBNAIL_STORE ] , 'readonly' ) ;
555- transaction . onerror = ( ) => {
556- reject ( new Error ( `Transaction error: ${ transaction . error } ` ) ) ;
555+ transaction . onerror = event => {
556+ reject ( new Error ( `Transaction error: ${ event . target . error } ` ) ) ;
557557 } ;
558558
559559 const thumbnailStore = transaction . objectStore ( THUMBNAIL_STORE ) ;
0 commit comments