@optique/core 1.0.0-dev.1747 → 1.0.0-dev.1749
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.
- package/dist/modifiers.cjs +3 -1
- package/dist/modifiers.js +3 -1
- package/package.json +1 -1
package/dist/modifiers.cjs
CHANGED
|
@@ -98,7 +98,9 @@ function deriveOptionalInnerParseState(outerState, parser) {
|
|
|
98
98
|
if (require_annotations.getAnnotations(outerState) != null && innerState != null && typeof innerState === "object") return require_annotations.inheritAnnotations(outerState, innerState);
|
|
99
99
|
return innerState;
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
const initial = parser.initialState;
|
|
102
|
+
if (initial != null && typeof initial !== "object") return initial;
|
|
103
|
+
return require_annotations.inheritAnnotations(outerState, initial);
|
|
102
104
|
}
|
|
103
105
|
/**
|
|
104
106
|
* Internal helper for optional-style parsing logic shared by optional()
|
package/dist/modifiers.js
CHANGED
|
@@ -98,7 +98,9 @@ function deriveOptionalInnerParseState(outerState, parser) {
|
|
|
98
98
|
if (getAnnotations(outerState) != null && innerState != null && typeof innerState === "object") return inheritAnnotations(outerState, innerState);
|
|
99
99
|
return innerState;
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
const initial = parser.initialState;
|
|
102
|
+
if (initial != null && typeof initial !== "object") return initial;
|
|
103
|
+
return inheritAnnotations(outerState, initial);
|
|
102
104
|
}
|
|
103
105
|
/**
|
|
104
106
|
* Internal helper for optional-style parsing logic shared by optional()
|