not-trac icon indicating copy to clipboard operation
not-trac copied to clipboard

Error when uploading an attachment

Open joemcgill opened this issue 8 years ago • 2 comments

I got the following error while trying to upload an attachment. I was using the kanban-ish branch at the time.

Two issues with errors of this nature:

  1. The attachment didn't upload at all, so that's obviously not how it's supposed to work.
  2. I had a comment drafted in the ticket view at the time, and there was no way to recover that message once the error occurred. Probably something worth exploring in a separate ticket, but wanted to mention.

====

TypeError: Cannot read property '1' of null

TicketChanges.getChange – src/components/TicketChanges.js:86

  83 | let description = attachments && patch in attachments && attachments[ patch ].description;
  84 | let pullLink = null;
  85 | if ( description && description.indexOf( 'https://github.com/WordPress/wordpress-develop/pull/' ) ) {
> 86 | 	pullLink = description.match( /(https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/\d+)/i )[ 1 ];
  87 | 	description = description.replace(
  88 | 		/\(From (https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/\d+)\)/,
  89 | 		''

joemcgill avatar Aug 25 '17 19:08 joemcgill

Ah dang, looks like @joehoyle beat me to this one in e39a61bd. Needs to be applied to the kanban-ish branch.

joemcgill avatar Aug 25 '17 21:08 joemcgill

@joemcgill This should be fixed now?

rmccue avatar Dec 06 '17 08:12 rmccue