From eae6a11719500425b94941509ba96ac35f28fece Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Sat, 1 Feb 2020 09:45:12 -0500 Subject: [PATCH] common: fix computed util when only passing one key as a string --- js/src/common/utils/computed.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/common/utils/computed.ts b/js/src/common/utils/computed.ts index 44e5e7e98..5441824c1 100644 --- a/js/src/common/utils/computed.ts +++ b/js/src/common/utils/computed.ts @@ -2,12 +2,12 @@ * The `computed` utility creates a function that will cache its output until * any of the dependent values are dirty. * - * @param {...String} dependentKeys The keys of the dependent values. - * @param {function} compute The function which computes the value using the + * @param dependentKeys The keys of the dependent values. + * @param compute The function which computes the value using the * dependent values. */ export default function computed(dependentKeys: string | string[], compute: Function): () => any { - const keys = Array.from(dependentKeys); + const keys = [].concat(dependentKeys); const dependentValues = {}; let computedValue;