Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When auto refresh is disabled in code, it cannot be turned on again #10

Open
freeranger opened this issue Mar 6, 2017 · 0 comments
Open

Comments

@freeranger
Copy link

My karma config sets autoReload: false as, by default, I do not want it auto refreshing.
I cannot then turn it on again in the UI - clicking "Enable Refresh" changes the local variable reload to true, so the refresh function

            var refresh = function() {
                if (reload) {
                    location.reload(true);
                }
            };

reloads the page, but then shouldReload:

            function shouldReload() {
                if (location.search != null && location.search != undefined && location.search.length > 0)
                    return location.search.substr(1) === 'true' ? true : false;
                else
                    return false;
            };

always returns false because location.search is empty.
Perhaps you should navigate to the page, setting true/false as appropriate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant