Let the developer disable the Studio if he wants

This commit is contained in:
loicsaintroch 2015-10-08 09:51:57 +02:00
parent b7d55291cd
commit d3a92fc8f8

View File

@ -43,7 +43,7 @@ module.exports = function (strapi) {
const _self = this; const _self = this;
let firstConnectionAttempt = true; let firstConnectionAttempt = true;
if (_.isPlainObject(strapi.config.studio) && !_.isEmpty(strapi.config.studio)) { if (_.isPlainObject(strapi.config.studio) && !_.isEmpty(strapi.config.studio) && strapi.config.studio.enabled === true) {
const manager = io.Manager(strapi.config.studio.url, { const manager = io.Manager(strapi.config.studio.url, {
reconnectionDelay: 2000, reconnectionDelay: 2000,
reconnectionDelayMax: 5000, reconnectionDelayMax: 5000,
@ -244,6 +244,8 @@ module.exports = function (strapi) {
strapi.log.warn(data.text); strapi.log.warn(data.text);
}); });
cb();
} else {
cb(); cb();
} }
}, },