Parcourir la source

fix: put_tabs() switch tab error

wangweimin il y a 4 ans
Parent
commit
af1b1f6130
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      webiojs/src/models/output.ts

+ 1 - 2
webiojs/src/models/output.ts

@@ -254,11 +254,10 @@ function render_tpl(tpl: string, data: { [i: string]: any }) {
         else
             return outputSpecToHtml({type: 'text', content: this, inline: true});
     };
-
     // {{#uniqueid}}name{{/uniqueid}}
     // {{uniqueid}}
+    let names2id: { [name: string]: any } = {};
     data['uniqueid'] = function () {
-        let names2id: { [name: string]: any } = {};
         return function (name: string) {
             if (name) {
                 if (!(name in names2id))