File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
projects/js-packages/publicize-components
src/social-store/selectors Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change
1
+ Significance: patch
2
+ Type: fixed
3
+ Comment: Fixes a TS error in trunk following a PR merged
4
+
5
+
Original file line number Diff line number Diff line change @@ -249,13 +249,11 @@ export const canUserManageConnection = createRegistrySelector(
249
249
return true ;
250
250
}
251
251
252
- const {
253
- // @ts -expect-error getUser exists but `core-data` entities are not typed properly.
254
- // Should work fine after https://github.com/WordPress/gutenberg/pull/67668 is released to npm.
255
- getUser,
256
- } = select ( coreStore ) ;
252
+ const { getUser } = select ( coreStore ) ;
257
253
258
254
// The user has to be at least an editor to manage the connection.
255
+ // @ts -expect-error User object types are wrong, capabilities are boolean, not string.
256
+ // See https://github.com/WordPress/gutenberg/pull/68045
259
257
return getUser ( current_user . id ) ?. capabilities ?. edit_others_posts ?? false ;
260
258
}
261
259
) ;
You can’t perform that action at this time.
0 commit comments