diff --git a/blocks-common/i-bem/__html/i-bem__html.bemhtml b/blocks-common/i-bem/__html/i-bem__html.bemhtml
index 4c047246..e0185835 100644
--- a/blocks-common/i-bem/__html/i-bem__html.bemhtml
+++ b/blocks-common/i-bem/__html/i-bem__html.bemhtml
@@ -472,6 +472,7 @@ default: {
var content = apply(this._mode = 'content');
if(content || content === 0) {
var isBEM = this.block || this.elem;
+ resetApplyNext();
apply(
this._notNewList = false,
this.position = isBEM ? 1 : this.position,
diff --git a/blocks-desktop/b-page/b-page.bemhtml b/blocks-desktop/b-page/b-page.bemhtml
index 1f294543..dc536e9a 100644
--- a/blocks-desktop/b-page/b-page.bemhtml
+++ b/blocks-desktop/b-page/b-page.bemhtml
@@ -7,49 +7,51 @@ block b-page {
attrs: { 'http-equiv': 'X-UA-Compatible', content: this.ctx['x-ua-compatible'] || 'IE=edge' }
}
- default: {
- var ctx = this.ctx,
- dtype = apply('doctype'),
- xUA = apply('xUACompatible'),
- buf = [
- dtype,
- {
- elem: 'root',
- content: [
- {
- elem: 'head',
- content: [
- ctx.csp && this.extend(ctx.csp, { elem: 'csp' }),
- {
- tag: 'meta',
- attrs: { charset: 'utf-8' }
- },
- xUA,
- {
- tag: 'title',
- content: ctx.title
- },
- ctx.favicon ? {
- elem: 'favicon',
- url: ctx.favicon
- } : '',
- ctx.meta,
- {
- block: 'i-ua',
- attrs: { nonce: ctx.nonce }
- },
- ctx.head
- ]
- },
- ctx
- ]
- }
- ];
-
- // For css and js elements and i-jquery, i-ua blocks
- this._nonce = this.ctx.nonce;
-
- applyCtx(buf);
+ default, !this._pageInit: {
+ return local({ _pageInit: true })(function() {
+ var ctx = this.ctx,
+ dtype = apply('doctype'),
+ xUA = apply('xUACompatible'),
+ buf = [
+ dtype,
+ {
+ elem: 'root',
+ content: [
+ {
+ elem: 'head',
+ content: [
+ ctx.csp && this.extend(ctx.csp, { elem: 'csp' }),
+ {
+ tag: 'meta',
+ attrs: { charset: 'utf-8' }
+ },
+ xUA,
+ {
+ tag: 'title',
+ content: ctx.title
+ },
+ ctx.favicon ? {
+ elem: 'favicon',
+ url: ctx.favicon
+ } : '',
+ ctx.meta,
+ {
+ block: 'i-ua',
+ attrs: { nonce: ctx.nonce }
+ },
+ ctx.head
+ ]
+ },
+ ctx
+ ]
+ }
+ ];
+
+ // For css and js elements and i-jquery, i-ua blocks
+ this._nonce = this.ctx.nonce;
+
+ applyCtx(buf);
+ });
}
tag: 'body'
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 6e9dcbf0..fc933500 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -63,8 +63,8 @@
}
},
"xjst": {
- "version": "0.10.0",
- "from": "xjst@>=0.10.0 <0.11.0",
+ "version": "0.11.1",
+ "from": "xjst@>=0.11.1 <0.12.0",
"dependencies": {
"coa": {
"version": "0.3.9",
diff --git a/package.json b/package.json
index af6e6d71..a13ce37b 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "2.10.0",
"private": true,
"dependencies": {
- "xjst": "~0.10.0",
+ "xjst": "~0.11.1",
"ometajs": "~3.3.5",
"dom-js": "~0.0.9",
"estraverse": "~1.5.0",