DEV: allows this.get in widgets (#8571)

This commit is contained in:
Joffrey JAFFEUX
2019-12-17 18:39:51 +01:00
committed by GitHub
parent 1c7305c0f1
commit 007652ece5
2 changed files with 25 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import { h } from "virtual-dom";
import DecoratorHelper from "discourse/widgets/decorator-helper";
import { Promise } from "rsvp";
import ENV from "discourse-common/config/environment";
import { get } from "@ember/object";
const _registry = {};
@@ -150,6 +151,10 @@ export default class Widget {
destroy() {}
get(propertyPath) {
return get(this, propertyPath);
}
render(prev) {
const { dirtyKeys } = this;