From 41f5297d7815ba1ac6ab0cd58f8bd22c5f566edb Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 17 Jul 2017 19:32:48 +0700 Subject: [PATCH] Deprecate `isSlotEmpty` in the plugins api --- plugin-api/beta/client/services/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin-api/beta/client/services/index.js b/plugin-api/beta/client/services/index.js index ddaa346ab..4e94a782a 100644 --- a/plugin-api/beta/client/services/index.js +++ b/plugin-api/beta/client/services/index.js @@ -1,3 +1,9 @@ export {t} from 'coral-framework/services/i18n'; export {can} from 'coral-framework/services/perms'; -export {isSlotEmpty} from 'coral-framework/helpers/plugins'; +import {isSlotEmpty as ise} from 'coral-framework/helpers/plugins'; + +// @TODO: Deprecated. +export function isSlotEmpty(...args) { + console.warn('A plugin is using `isSlotEmpty` which has been deprecated, please port to the new API using the `IfSlotIsEmpty` and `IfSlotIsNotEmpty` components.'); + return ise(...args); +}