Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: chrome/browser/resources/google_now/background.js

Issue 469943002: Check the Argument to the Catch Function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/google_now/background.js
diff --git a/chrome/browser/resources/google_now/background.js b/chrome/browser/resources/google_now/background.js
index 75bea2f483d1913579b3a732a34c97bcc2446a6a..5d3eaf091c5e7f18c111b89689225ea419cac77b 100644
--- a/chrome/browser/resources/google_now/background.js
+++ b/chrome/browser/resources/google_now/background.js
@@ -818,6 +818,7 @@ function requestCardDismissal(
Promise.resolve() :
Promise.reject();
}).catch(function(request) {
+ request = (typeof request === 'object') ? request : {};
return (request.status == HTTP_BAD_REQUEST ||
request.status == HTTP_METHOD_NOT_ALLOWED) ?
Promise.resolve() :
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698