[REF] qweb: use global nextID

and reset it to 1 before each test s.t. snapshots are deterministic.
This commit is contained in:
Aaron Bohy
2019-11-27 15:07:10 +01:00
parent 65344dbf1f
commit 12be815342
9 changed files with 178 additions and 180 deletions
+2 -3
View File
@@ -6,7 +6,7 @@ export const INTERP_REGEXP = /\{\{.*?\}\}/g;
//------------------------------------------------------------------------------
export class CompilationContext {
nextID: number = 1;
static nextID: number = 1;
code: string[] = [];
variables: { [key: string]: QWebVar } = {};
escaping: boolean = false;
@@ -42,8 +42,7 @@ export class CompilationContext {
}
generateID(): number {
const id = this.rootContext.nextID++;
return id;
return CompilationContext.nextID++;
}
/**