~canonical-sysadmins/wordpress/5.0.3

« back to all changes in this revision

Viewing changes to wp-admin/js/editor.js

  • Committer: axino
  • Date: 2018-01-25 07:47:10 UTC
  • Revision ID: axino@canonical.com-20180125074710-0m0j5dc8ldu3ou9t
update to wordpress 4.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
695
695
                 */
696
696
                function findBookmarkedPosition( editor ) {
697
697
                        // Get the TinyMCE `window` reference, since we need to access the raw selection.
698
 
                        var TinyMCEWIndow = editor.getWin(),
699
 
                                selection = TinyMCEWIndow.getSelection();
 
698
                        var TinyMCEWindow = editor.getWin(),
 
699
                                selection = TinyMCEWindow.getSelection();
700
700
 
701
 
                        if ( selection.rangeCount <= 0 ) {
 
701
                        if ( ! selection || selection.rangeCount < 1 ) {
702
702
                                // no selection, no need to continue.
703
703
                                return;
704
704
                        }