Skip to content

Commit

Permalink
remove checker for warnings in production version
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Mar 25, 2017
1 parent c227bf8 commit 2983514
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@
node.children.push(parsedChildState);
}
increment(0);
if (!token) {
if ("development" !== "production" && !token) {
// No token means a tag was left unclosed
error('The element "' + node.type + '" was left unclosed.');
break;
Expand Down Expand Up @@ -1361,7 +1361,7 @@
this.$el = document.querySelector(el);
this.$destroyed = false;

if (!this.$el) {
if ("development" !== "production" && !this.$el) {
error("Element " + this.$opts.el + " not found");
}

Expand Down
2 changes: 1 addition & 1 deletion dist/moon.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/compiler/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const walk = function(state) {
node.children.push(parsedChildState);
}
increment(0);
if(!token) {
if("__ENV__" !== "production" && !token) {
// No token means a tag was left unclosed
error(`The element "${node.type}" was left unclosed.`);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/instance/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Moon.prototype.mount = function(el) {
this.$el = document.querySelector(el);
this.$destroyed = false;

if(!this.$el) {
if("__ENV__" !== "production" && !this.$el) {
error("Element " + this.$opts.el + " not found");
}

Expand Down

0 comments on commit 2983514

Please sign in to comment.