Browse Source

[js] don't try to generate extern fields in ES5 prototypes (closes #10192)

Dan Korostelev 4 years ago
parent
commit
29926fc8d3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/generators/genjs.ml

+ 2 - 0
src/generators/genjs.ml

@@ -1243,6 +1243,8 @@ let gen_class_static_field ctx c cl_path f =
 let can_gen_class_field ctx = function
 	| { cf_expr = (None | Some { eexpr = TConst TNull }) } when not (has_feature ctx "Type.getInstanceFields") ->
 		false
+	| f when has_class_field_flag f CfExtern ->
+		false
 	| f ->
 		is_physical_field f