mm_os 2.2.5 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -292,6 +292,9 @@ MQTT.prototype.receive = async function(push_topic, msg) {
292
292
  * @param {Boolean} retain 保持
293
293
  */
294
294
  MQTT.prototype.subscribe = function(topic, func, qos = null, retain = false) {
295
+ if (!this.client) {
296
+ return;
297
+ }
295
298
  if (qos === null || qos === undefined) {
296
299
  qos = this.config.subscribe_qos || 0;
297
300
  }
package/lib/app.js CHANGED
@@ -27,7 +27,9 @@ App.prototype.fullAction = function(action) {
27
27
  action.init_before = function() {
28
28
  // 创建插件
29
29
  this.plugin = $.plugin_admin(action.key, action.title || action.name);
30
- this.plugin.update(action.jsonFile.dirname());
30
+ this.plugin.update(action.jsonFile.dirname()).then(() => {
31
+ this.plugin.exec(null, 'init');
32
+ });
31
33
  }
32
34
  }
33
35
  return action;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {