FIX: `guidFor` is not part of `Ember.Object`

This commit is contained in:
Robin Ward 2020-05-20 11:31:11 -04:00
parent bd57ae83f1
commit 6c9c8dfefd
3 changed files with 4 additions and 3 deletions

View File

@ -36,7 +36,6 @@ var define, requirejs;
default: Ember.Object,
get: Ember.get,
getProperties: Ember.getProperties,
guidFor: Ember.guidFor,
set: Ember.set,
setProperties: Ember.setProperties,
computed: Ember.computed,

View File

@ -3,6 +3,7 @@ import { cancel, later } from "@ember/runloop";
import { Promise } from "rsvp";
import { iconHTML } from "discourse-common/lib/icon-library";
import I18n from "I18n";
import { guidFor } from "@ember/object/internals";
// http://github.com/feross/clipboard-copy
function clipboardCopy(text) {
@ -90,7 +91,7 @@ export default {
const state = button.innerHTML;
button.innerHTML = I18n.t("copy_codeblock.copied");
const commandId = Ember.guidFor(button);
const commandId = guidFor(button);
if (_fadeCopyCodeblocksRunners[commandId]) {
cancel(_fadeCopyCodeblocksRunners[commandId]);

View File

@ -1,5 +1,6 @@
import I18n from "I18n";
import EmberObject, { computed, get, guidFor } from "@ember/object";
import EmberObject, { computed, get } from "@ember/object";
import { guidFor } from "@ember/object/internals";
import Component from "@ember/component";
import deprecated from "discourse-common/lib/deprecated";
import { makeArray } from "discourse-common/lib/helpers";