Răsfoiți Sursa

allow script tags

Evan You 10 ani în urmă
părinte
comite
20200de577
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      src/compiler/parser/html-parser.js
  2. 1 1
      src/compiler/parser/index.js

+ 1 - 1
src/compiler/parser/html-parser.js

@@ -182,7 +182,7 @@ export function parseHTML (html, handler) {
     }
     }
 
 
     if (html === last) {
     if (html === last) {
-      throw new Error('Parse Error: ' + html)
+      throw new Error('Error parsing template:\n\n' + html)
     }
     }
   }
   }
 
 

+ 1 - 1
src/compiler/parser/index.js

@@ -145,7 +145,7 @@ export function parse (template, options) {
           `Component template should contain exactly one root element:\n\n${template}`
           `Component template should contain exactly one root element:\n\n${template}`
         )
         )
       }
       }
-      if (currentParent && tag !== 'script') {
+      if (currentParent) {
         if (element.else) {
         if (element.else) {
           processElse(element, currentParent)
           processElse(element, currentParent)
         } else {
         } else {