From a06691f5b87f7e90fed0115b78ce6febc4479206 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Thu, 23 Mar 2017 21:03:13 +0100 Subject: [PATCH] Fixed: Actually emit TS compatible enums in static target if not aliases, see #720 --- cli/targets/static.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/targets/static.js b/cli/targets/static.js index 8cf2bf742..dff87f329 100644 --- a/cli/targets/static.js +++ b/cli/targets/static.js @@ -606,7 +606,7 @@ function buildEnum(ref, enm) { var aliased = []; Object.keys(enm.values).forEach(function(key) { var val = enm.values[key]; - if (aliased.indexOf(val) >= -1) + if (aliased.indexOf(val) > -1) push("values[" + JSON.stringify(key) + "] = " + val + ";"); else { push("values[valuesById[" + val + "] = " + JSON.stringify(key) + "] = " + val + ";");