Skip to content

Commit 820d596

Browse files
authored
Merge pull request desktop#16151 from desktop/no-proptypes-in-prod-builds
Fix prod build crash due to propTypes not being defined
2 parents bb67807 + 4335b01 commit 820d596

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/src/ui/index.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,13 @@ ipcRenderer.on('url-action', (_, action) =>
366366
//
367367
// 1. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label
368368
// 2. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-readonly
369-
;(function (defaults: Record<string, unknown>, types: Record<string, unknown>) {
369+
;(function (
370+
defaults: Record<string, unknown> | undefined,
371+
types: Record<string, unknown> | undefined
372+
) {
370373
;['aria-label', 'aria-readonly'].forEach(k => {
371-
delete defaults[k]
372-
delete types[k]
374+
delete defaults?.[k]
375+
delete types?.[k]
373376
})
374377
})(Grid.defaultProps, Grid.propTypes)
375378

0 commit comments

Comments
 (0)