marko 6.0.35 → 6.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -797,7 +797,6 @@ function getExprRoot(path5) {
797
797
  function getFnRoot(path5) {
798
798
  let curPath = path5;
799
799
  let fnPath;
800
- if (curPath.isProgram()) return;
801
800
  while (!isMarko(curPath)) {
802
801
  if (isFunction(curPath)) {
803
802
  fnPath = curPath;
@@ -809,7 +808,12 @@ function getFnRoot(path5) {
809
808
  break;
810
809
  }
811
810
  }
812
- curPath = curPath.parentPath;
811
+ const parentPath = curPath.parentPath;
812
+ if (parentPath) {
813
+ curPath = parentPath;
814
+ } else {
815
+ break;
816
+ }
813
817
  }
814
818
  return fnPath;
815
819
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.35",
3
+ "version": "6.0.36",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",