title: Pipeline editor unable to open Jenkinsfile in Jenkins BlueOcean
body: <p>I am extremely new to BlueOcean and am getting the below error when trying to open the pipeline editor:</p>
  
  <blockquote>
    <p>There was an error loading the pipeline from the Jenkinsfile in this
     repository. Correct the error by editing the Jenkinsfile using the
    declarative syntax then commit it back to the repository.</p>
    
    <p>Cannot read property 'indexOf' of undefined</p>
  </blockquote>
  
  <p><strong>Jenkinsfile</strong>:</p>
  
  <pre><code>pipeline {
     agent any
  
     stages {
        stage('Build') {
          steps {
              echo 'Building..'
          }
      }
      stage('Test') {
          steps {
              echo 'Testing..'
          }
      }
      stage('Deploy') {
          steps {
              echo 'Deploying....'
          }
       }
    }
  }
  </code></pre>
  
  <p><strong>Error screenshot -</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/Wcwyp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wcwyp.png" alt="ERROR"></a></p>