From 168e7cd69cc98b337647abdfa8f5d2a6dfaa84b8 Mon Sep 17 00:00:00 2001 From: Jan Vennemann Date: Thu, 23 Jul 2020 23:44:36 +0200 Subject: [PATCH] fix: check for new ui session feature --- lib/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index ea77519..90aa243 100644 --- a/lib/index.js +++ b/lib/index.js @@ -64,7 +64,13 @@ global.Backbone = Alloy.Backbone; ${content} -Alloy.createController('index');`; +Ti.UI.addEventListener('sessionbegin', function () { + Alloy.createController('index'); +}); + +if ((typeof Ti.UI.hasSession === 'undefined') || Ti.UI.hasSession) { + Alloy.createController('index'); +}`; let map; if (inputSourceMap) {