FIX: removes legacy Ember.keys usage causing a crash (#13085)

FIX: removes legacy Ember.keys usage causing a crash (#13085)

The crash:

Uncaught TypeError: Ember.keys is not a function

Repro:

  • visit home page
  • click new topic
  • navigate to your messages by clicking your avatar (top right), then enveloppe icon, and finally the bottom chevron
  • click New Message
  • click cancel in the composer, it should crash
diff --git a/app/assets/javascripts/discourse/app/models/composer.js b/app/assets/javascripts/discourse/app/models/composer.js
index 83ec5fa..b36abfb 100644
--- a/app/assets/javascripts/discourse/app/models/composer.js
+++ b/app/assets/javascripts/discourse/app/models/composer.js
@@ -480,7 +480,7 @@ const Composer = RestModel.extend({
 
   @discourseComputed("metaData")
   hasMetaData(metaData) {
-    return metaData ? isEmpty(Ember.keys(metaData)) : false;
+    return metaData ? isEmpty(Object.keys(metaData)) : false;
   },
 
   replyDirty: propertyNotEqual("reply", "originalText"),

GitHub sha: c78f32a9

This commit appears in #13085 which was approved by CvX. It was merged by jjaffeux.