@selfcommunity/react-ui 1.0.3 → 1.0.4-alpha.1
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.
|
@@ -761,7 +761,7 @@ function ContributionActionsMenu(props) {
|
|
|
761
761
|
*/
|
|
762
762
|
function canPublishContribution() {
|
|
763
763
|
const user = scUserContext.user;
|
|
764
|
-
if (!user || contributionObj.deleted || !scheduledPostsEnabled || !feedObj.draft)
|
|
764
|
+
if (!user || contributionObj.deleted || !scheduledPostsEnabled || !(feedObj === null || feedObj === void 0 ? void 0 : feedObj.draft))
|
|
765
765
|
return false;
|
|
766
766
|
return user.id === contributionObj.author.id || (scheduledPostsEnabled && (react_core_1.UserUtils.isAdmin(user) || react_core_1.UserUtils.isModerator(user)));
|
|
767
767
|
}
|
|
@@ -759,7 +759,7 @@ export default function ContributionActionsMenu(props) {
|
|
|
759
759
|
*/
|
|
760
760
|
function canPublishContribution() {
|
|
761
761
|
const user = scUserContext.user;
|
|
762
|
-
if (!user || contributionObj.deleted || !scheduledPostsEnabled || !feedObj.draft)
|
|
762
|
+
if (!user || contributionObj.deleted || !scheduledPostsEnabled || !(feedObj === null || feedObj === void 0 ? void 0 : feedObj.draft))
|
|
763
763
|
return false;
|
|
764
764
|
return user.id === contributionObj.author.id || (scheduledPostsEnabled && (UserUtils.isAdmin(user) || UserUtils.isModerator(user)));
|
|
765
765
|
}
|