Opened 9 years ago
Closed 9 years ago
#35363 closed defect (bug) (fixed)
Bug js when replacing a audio or video in post editor
Reported by: | truonght | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | |
Focuses: | javascript | Cc: |
Description
When I replace a audio or video in editor, browser console show an error:
Uncaught TypeError: Cannot read property 'indexOf' of undefined
In file wp-includes/js/media-audiovideo.js?ver=4.4.1, line 801:
if ( this.model.get( 'src' ).indexOf( 'vimeo' ) > -1 && ! ( 'Froogaloop' in window ) )
I think we should check this.model.get( 'src' ) !== undefined
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Confirmed. This is a bit "hacky" place to be checking the src but don't see a better one for now. It only prevents a preview to be shown in the modal, the video/audio is replaced properly in the editor.