Skip to content

Commit

Permalink
pass writeCapability explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Jul 28, 2023
1 parent d5f231d commit cdd844b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@ function buildOptimisticChatReport(
isOwnPolicyExpenseChat = false,
oldPolicyName = '',
visibility = undefined,
writeCapability = CONST.REPORT.WRITE_CAPABILITIES.ALL,
writeCapability = undefined,
notificationPreference = CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS,
parentReportActionID = '',
parentReportID = '',
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ function navigateToConciergeChat() {
* @param {Array<Number>} policyMembersAccountIDs
* @param {String} writeCapability
*/
function addPolicyReport(policyID, reportName, visibility, policyMembersAccountIDs, writeCapability) {
function addPolicyReport(policyID, reportName, visibility, policyMembersAccountIDs, writeCapability = CONST.REPORT.WRITE_CAPABILITIES.ALL) {
// The participants include the current user (admin), and for restricted rooms, the policy members. Participants must not be empty.
const members = visibility === CONST.REPORT.VISIBILITY.RESTRICTED ? policyMembersAccountIDs : [];
const participants = _.unique([currentUserAccountID, ...members]);
Expand Down

0 comments on commit cdd844b

Please sign in to comment.