Add h helper to plugin-api in v0.3

This commit is contained in:
Robin Ward 2016-04-07 16:38:30 -04:00
parent 71ef6ea518
commit b10b6c673d

View File

@ -8,12 +8,14 @@ import { addWidgetCleanCallback } from 'discourse/components/mount-widget';
import { createWidget, decorateWidget, changeSetting } from 'discourse/widgets/widget';
import { onPageChange } from 'discourse/lib/page-tracker';
import { preventCloak } from 'discourse/widgets/post-stream';
import { h } from 'virtual-dom';
class PluginApi {
constructor(version, container) {
this.version = version;
this.container = container;
this._currentUser = container.lookup('current-user:main');
this.h = h;
}
/**
@ -286,7 +288,7 @@ class PluginApi {
let _pluginv01;
function getPluginApi(version) {
if (version === "0.1" || version === "0.2") {
if (version === "0.1" || version === "0.2" || version === "0.3") {
if (!_pluginv01) {
_pluginv01 = new PluginApi(version, Discourse.__container__);
}