open-consul/ui-v2/app/env.js
John Cowen 839e79d16e ui: Adds easily accessible env for user settable 'debug' settings (#5668)
This is a synchronous only 'debug' setting accessor, uses localStorage
first and falls back to ember config.
2019-05-01 18:22:35 +00:00

6 lines
170 B
JavaScript

import config from './config/environment';
export default function(str) {
const user = window.localStorage.getItem(str);
return user !== null ? user : config[str];
}