From 1fb084fa46c1b442854f8e20f93bae75507f1210 Mon Sep 17 00:00:00 2001 From: Michael Siadak Date: Tue, 15 Sep 2020 12:42:40 -0600 Subject: [PATCH 1/3] Add callout to use evaluationReasons option --- src/content/topics/sdk/client-side/javascript/index.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/content/topics/sdk/client-side/javascript/index.mdx b/src/content/topics/sdk/client-side/javascript/index.mdx index 26e849e0d..8df149414 100644 --- a/src/content/topics/sdk/client-side/javascript/index.mdx +++ b/src/content/topics/sdk/client-side/javascript/index.mdx @@ -598,6 +598,15 @@ The default value will only be returned if an error is encountered—for example The `variationDetail` method allows you to evaluate a feature flag (using the same parameters as you would for `variation`) and receive more information about how the value was calculated. + + Don't forget + +You must enable `evaluationReasons` option when intializing the LaunchDarkly client or the `reason` object returned by this method will always be null. + +To learn more, read [Customizing your client](#customizing-your-client). + + + The variation detail is returned in an object that contains both the result value and a "reason" object which will tell you, for instance, if the user was individually targeted for the flag or was matched by one of the flag's rules. It will also indicate if the flag returned the default value due to an error. You can examine the "reason" data programmatically; you can also view it with data export, if you are capturing detailed analytics events for this flag. From 5cad199afeb29bac60517e8d18b95fa97e3cbdbf Mon Sep 17 00:00:00 2001 From: Michael Siadak Date: Tue, 15 Sep 2020 12:44:38 -0600 Subject: [PATCH 2/3] Add missing article --- src/content/topics/sdk/client-side/javascript/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/topics/sdk/client-side/javascript/index.mdx b/src/content/topics/sdk/client-side/javascript/index.mdx index 8df149414..9d7c35439 100644 --- a/src/content/topics/sdk/client-side/javascript/index.mdx +++ b/src/content/topics/sdk/client-side/javascript/index.mdx @@ -601,8 +601,8 @@ The `variationDetail` method allows you to evaluate a feature flag (using the sa Don't forget -You must enable `evaluationReasons` option when intializing the LaunchDarkly client or the `reason` object returned by this method will always be null. - +You must enable the `evaluationReasons` option when intializing the LaunchDarkly client or the `reason` object returned by this method will always be null. + To learn more, read [Customizing your client](#customizing-your-client). From 4306dac8bf8a7c4f7b330ba52b6e8c240fce5470 Mon Sep 17 00:00:00 2001 From: Sarah Day Date: Thu, 17 Sep 2020 12:03:39 -0700 Subject: [PATCH 3/3] Copyedit --- src/content/topics/sdk/client-side/javascript/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/topics/sdk/client-side/javascript/index.mdx b/src/content/topics/sdk/client-side/javascript/index.mdx index 9d7c35439..d824631eb 100644 --- a/src/content/topics/sdk/client-side/javascript/index.mdx +++ b/src/content/topics/sdk/client-side/javascript/index.mdx @@ -599,9 +599,9 @@ The default value will only be returned if an error is encountered—for example The `variationDetail` method allows you to evaluate a feature flag (using the same parameters as you would for `variation`) and receive more information about how the value was calculated. - Don't forget + You must enable the evaluationReasons option -You must enable the `evaluationReasons` option when intializing the LaunchDarkly client or the `reason` object returned by this method will always be null. +You must enable the `evaluationReasons` option when you initialize the LaunchDarkly client. If you do not do this, the `reason` object returned by this method will always be null. To learn more, read [Customizing your client](#customizing-your-client).