Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef Gabrielsson committed Jun 23, 2024
1 parent d4180b4 commit 60e62e5
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions nightly/front.js
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ var app = {
app.disable(false)

// Continue running application.
if (app.modules.total === 0) app.assets.get.vars()
if (app.extensions.total === 0) app.assets.get.vars()
if (app.vars.total === 0) app.attributes.run()
} else {
var templateElement = dom.get('template', true)[0], // Get only the first template element.
Expand Down Expand Up @@ -1575,13 +1575,10 @@ var app = {
app.extensions = {
module: modules,
plugin: plugins,
total: modules.length + plugins.length
total: modules.length + plugins.length,
loaded: 0
}

// Todo: Remove in future.
app.modules.name = modules
app.modules.total = modules.length

app.vars.name = vars
app.vars.total = vars.length
},
Expand Down Expand Up @@ -1632,7 +1629,6 @@ var app = {
script.onload = function () {
app.log.info(1)(this.name)
app.extensions.loaded++
app.modules.loaded++ //Todo: Remove in the future.
var name = isModule ? app.module[this.name] : app.plugin[this.name]

if (name) {
Expand All @@ -1646,7 +1642,7 @@ var app = {
}
}

if (app.modules.loaded === app.extensions.total) {
if (app.extensions.loaded === app.extensions.total) {
app.assets.get.vars()
}
}
Expand Down Expand Up @@ -2031,12 +2027,11 @@ var app = {
templateSrcDoc = target !== 'main' ? elementSrcDoc || false : false,
templateSrc = elementSrc && elementSrc.split(';') || []

app.modules.total = 0 // Without this. it creates duplicate xhr requests.
self.currentAsset.loaded = 0
app.vars.total = 0
app.extensions.total = 0 // Without this. it creates duplicate xhr requests.
app.templates.total = 0
app.templates.loaded = 0
app.vars.total = 0
self.currentAsset.loaded = 0

app.srcTemplate = {
url: {
Expand Down Expand Up @@ -2079,12 +2074,12 @@ var app = {
return
}

if (app.modules.loaded === app.extensions.total
if (app.extensions.loaded === app.extensions.total
&& app.vars.loaded === (app.vars.total + app.vars.totalStore)
&& type !== 'template' && type !== 'data') {

//console.log('Extensions loaded:', app.modules.loaded + '/' + app.extensions.total)
//console.log('Vars loaded:', app.vars.loaded + '/' + (app.vars.total + app.vars.totalStore))
/*console.log('Extensions loaded:', app.extensions.loaded + '/' + app.extensions.total)
console.log('Vars loaded:', app.vars.loaded + '/' + (app.vars.total + app.vars.totalStore))*/

app.disable(false)
app.attributes.run()
Expand Down

0 comments on commit 60e62e5

Please sign in to comment.