fix: runtime mismatch check

This commit is contained in:
Dylan Piercey 2021-01-14 10:33:03 -07:00
parent efb26bb975
commit 892f9d0f10
No known key found for this signature in database
GPG Key ID: 9736AB8CA3ED17CA

View File

@ -65,10 +65,15 @@ function createRendererFunc(
var shouldApplySplitMixins = renderingLogic && isSplit;
if (!"MARKO_DEBUG" !== !componentProps.d) {
throw new Error(
"Component was compiled in a different NODE_ENV than the Marko runtime is using."
);
// eslint-disable-next-line no-constant-condition
if ("MARKO_DEBUG") {
if (!componentProps.d) {
throw new Error(
"Component was compiled in a different NODE_ENV than the Marko runtime is using."
);
}
} else if (componentProps.d) {
throw new Error("Runtime/NODE_ENV Mismatch");
}
return function renderer(input, out) {