[storeUrlInSession] only check for url overflows when not storing state in session (#10878)

This commit is contained in:
Spencer 2017-04-10 20:34:13 -07:00 committed by GitHub
parent 6d254a3cc9
commit ca3d3e03af

View file

@ -44,7 +44,7 @@ export default function (chrome, internals) {
$compileProvider.debugInfoEnabled(false);
}
}])
.run(($location, $rootScope, Private) => {
.run(($location, $rootScope, Private, config) => {
chrome.getFirstPathSegment = () => {
return $location.path().split('/')[1];
};
@ -65,6 +65,8 @@ export default function (chrome, internals) {
const notify = new Notifier();
const urlOverflow = Private(UrlOverflowServiceProvider);
const check = () => {
// disable long url checks when storing state in session storage
if (config.get('state:storeInSessionStorage')) return;
if ($location.path() === '/error/url-overflow') return;
try {