summaryrefslogtreecommitdiff
path: root/spec/javascripts/bootstrap_linked_tabs_spec.js.es6
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/bootstrap_linked_tabs_spec.js.es6')
-rw-r--r--spec/javascripts/bootstrap_linked_tabs_spec.js.es67
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/javascripts/bootstrap_linked_tabs_spec.js.es6 b/spec/javascripts/bootstrap_linked_tabs_spec.js.es6
index 54055b04f62..9f6db2b0723 100644
--- a/spec/javascripts/bootstrap_linked_tabs_spec.js.es6
+++ b/spec/javascripts/bootstrap_linked_tabs_spec.js.es6
@@ -3,7 +3,12 @@ require('~/lib/utils/bootstrap_linked_tabs');
(() => {
// TODO: remove this hack!
// PhantomJS causes spyOn to panic because replaceState isn't "writable"
- const phantomjs = !Object.getOwnPropertyDescriptor(window.history, 'replaceState').writable;
+ let phantomjs;
+ try {
+ phantomjs = !Object.getOwnPropertyDescriptor(window.history, 'replaceState').writable;
+ } catch (err) {
+ phantomjs = false;
+ }
describe('Linked Tabs', () => {
preloadFixtures('static/linked_tabs.html.raw');