mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
committed by
Géry Debongnie
parent
8fbf2172c5
commit
05a678c039
@@ -1,5 +1,4 @@
|
||||
import { QWeb } from "./qweb/index";
|
||||
import { Env } from "./component/component";
|
||||
|
||||
/**
|
||||
* This file creates and exports the OWL 'config' object, with keys:
|
||||
@@ -8,7 +7,6 @@ import { Env } from "./component/component";
|
||||
*/
|
||||
|
||||
interface Config {
|
||||
env: Env;
|
||||
mode: string;
|
||||
}
|
||||
|
||||
@@ -30,19 +28,3 @@ Object.defineProperty(config, "mode", {
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
let env:Env;
|
||||
Object.defineProperty(config, "env", {
|
||||
get() {
|
||||
if (!env) {
|
||||
env = {} as Env;
|
||||
}
|
||||
if (!env.qweb) {
|
||||
env.qweb = new QWeb();
|
||||
}
|
||||
return env;
|
||||
},
|
||||
set(newEnv: Env) {
|
||||
env = newEnv;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user