From c71a84a6558c0e472bd71d30a2771dc41d31f704 Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Mon, 3 Dec 2018 16:24:48 -0700 Subject: [PATCH] Fix: Type error in `requestFromUrl` When using `requestFromUrl()` in #29026 we noticed errors being thrown from within `waitForData()`. Investigation revealed this basic type error that could have been caught by a language and compiler before it was pushed to production. Yay JS. This wasn't detected because this function isn't yet being used and we weren't sure how to test it. Thankfully our fail-fast methodology prevented this from appearing to our customers. --- client/state/data-getters/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/state/data-getters/index.js b/client/state/data-getters/index.js index b8732ae524db7..0f978d1d49164 100644 --- a/client/state/data-getters/index.js +++ b/client/state/data-getters/index.js @@ -38,7 +38,7 @@ import { dummyTaxRate } from 'lib/tax'; // #tax-on-checkout-placeholder */ export const requestFromUrl = url => requestHttpData( `get-at-url-${ url }`, rawHttp( { method: 'GET', url } ), { - fromApi: () => data => [ `get-at-url-${ url }`, data ], + fromApi: () => data => [ [ `get-at-url-${ url }`, data ] ], } ); export const requestActivityActionTypeCounts = (