Skip to content

Commit

Permalink
feat: pass the error object to event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Tan committed Jun 9, 2016
1 parent cd75c55 commit ab4a8e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions appcache-nanny.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
//
//
//
function handleNetworkSuccesss(event) {
function handleNetworkSuccess(event) {
var prefix = '';

// when page gets opened for the very first time, it already has
Expand All @@ -352,7 +352,7 @@
trigger('updateready')
pendingUpdateReady = false
} else {
trigger(prefix + event.type);
trigger(prefix + event.type, event);
}

if (! hasNetworkError) return;
Expand All @@ -365,9 +365,9 @@
//
//
//
function handleNetworkError () {
function handleNetworkError (error) {
// re-trigger event via appCacheNanny
trigger('error');
trigger('error', error);

if (hasNetworkError) return;
hasNetworkError = true;
Expand Down

0 comments on commit ab4a8e3

Please sign in to comment.