From b8179673778a545a2c7bea4f34f4908f5b10432b Mon Sep 17 00:00:00 2001 From: "Keith J. Grant" Date: Mon, 19 Apr 2021 09:38:50 -0700 Subject: [PATCH] delete unused function --- .../components/CodeEditor/VariablesDetail.jsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx b/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx index e866c0cb12..beda9dcacd 100644 --- a/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx +++ b/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx @@ -23,23 +23,6 @@ import { import CodeEditor from './CodeEditor'; import { JSON_MODE, YAML_MODE } from './constants'; -function getValueAsMode(value, mode) { - if (!value) { - if (mode === JSON_MODE) { - return '{}'; - } - return '---'; - } - const modeMatches = isJsonString(value) === (mode === JSON_MODE); - if (modeMatches) { - if (mode === YAML_MODE) { - return value; - } - return JSON.stringify(JSON.parse(value), null, 2); - } - return mode === YAML_MODE ? jsonToYaml(value) : yamlToJson(value); -} - function VariablesDetail({ dataCy, helpText,