mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Merge pull request #8345 from elastic/jasper/backport/8343/5.0
[backport] PR #8343 to 5.0 - Report useful error message when sessionStorage is unavailable
This commit is contained in:
commit
f1010b37b3
1 changed files with 11 additions and 2 deletions
|
@ -8,6 +8,17 @@ module.exports = function (chrome, internals) {
|
|||
}
|
||||
|
||||
internals.appUrlStore = internals.appUrlStore || window.sessionStorage;
|
||||
try {
|
||||
const verifySessionStorage = 'verify sessionStorage';
|
||||
internals.appUrlStore.setItem(verifySessionStorage, 1);
|
||||
internals.appUrlStore.removeItem(verifySessionStorage);
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
'Kibana requires access to sessionStorage, and it looks like ' +
|
||||
'your browser is restricting it. If you\'re ' +
|
||||
'using Safari with private browsing enabled, you can solve this ' +
|
||||
'problem by disabling private browsing, or by using another browser.');
|
||||
}
|
||||
|
||||
/**
|
||||
* ui/chrome apps API
|
||||
|
@ -50,6 +61,4 @@ module.exports = function (chrome, internals) {
|
|||
chrome.setLastUrlFor = function (appId, url) {
|
||||
internals.appUrlStore.setItem(`appLastUrl:${appId}`, url);
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue