Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Fix lint (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
axelssonHakan committed Feb 8, 2019
1 parent 6a18553 commit 7d6091b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bookmark/bookmark.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
javascript: (function () {
/* eslint-disable no-labels, no-unused-labels, no-restricted-syntax */
javascript: (function bookmark() {
const getAppId = (location) => {
const prefix = '/sense/app/';
let start = location.pathname.indexOf(prefix);
if (start === -1) return;
if (start === -1) return undefined;
start += prefix.length;
const end = location.pathname.indexOf('/', start);
const appId = location.pathname.substring(start, end !== -1 ? end : location.pathname.length);
Expand All @@ -12,7 +13,7 @@ javascript: (function () {
if (appId) {
const { hostname } = window.location;
const protocol = window.location.protocol === 'http:' ? 'ws' : 'wss';
const port = window.location.port === '' ? '': `:${window.location.port}`;
const port = window.location.port === '' ? '' : `:${window.location.port}`;

const engineUrl = `${protocol}://${hostname}${port}/app/${appId}`;
const url = `http://catwalk.core.qlik.com/?engine_url=${engineUrl}`;
Expand Down

0 comments on commit 7d6091b

Please sign in to comment.