Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-15986

Javascript error while editing pull request with deleted source branch

    XMLWordPrintable

Details

    Description

      Summary

      If a pull request's source branch has been deleted, a Javascript error prompts while editing the pull request.

      ###Steps to Reproduce

      1. Create branch A (add and push a file)
      2. Create branch B (add and push a file)
      3. Create a pull request from branch A to branch B
      4. Merge branch A and branch B to master branch
      5. Push to the remote repository
      6. Delete the branches A and B locally and to the remote repository
      7. Go to the created pull requests and try to edit it

      ###Actual Results
      The below exception is thrown in the Chrome browser console log:

      #!javascript
      
      Uncaught TypeError: Cannot read property 'split' of null
      at t.default (parse-compare-spec.js?b510:4)
      at e (edit.js:255)
      at e.Router.<anonymous> (edit.js:281)
      at e.Router.<anonymous> (index.js:7363)
      at i (director.js?a3c1:517)
      at n (director.js?a3c1:298)
      at e.Router.d.invoke (director.js?a3c1:522)
      at r (director.js?a3c1:480)
      at e.Router.d.dispatch (director.js?a3c1:492)
      at e.Router.handler (director.js?a3c1:186)
      at e.Router.d.init (director.js?a3c1:214)
      at Object.3213 (pullrequests.js:44)
      at t (bootstrap ca56b293ff22420f7f4d?fd03:52)
      at Object.3719 (pullrequests.js:17278)
      at t (bootstrap ca56b293ff22420f7f4d?fd03:52)
      at window.webpackJsonp (bootstrap ca56b293ff22420f7f4d?fd03:23)
      at pullrequests.js:1
      

      ###Workaround
      No workaround yet

      Attachments

        1. pr_bug_1.png
          pr_bug_1.png
          35 kB
        2. pr_bug_2.png
          pr_bug_2.png
          39 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mcerezo Mark C
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: