mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-21 14:24:47 +08:00
Inlined arrays fixed
This commit is contained in:
7
dist/ueblueprint.js
vendored
7
dist/ueblueprint.js
vendored
@@ -3083,7 +3083,7 @@ class Grammar {
|
||||
/**
|
||||
* @template T
|
||||
* @param {AttributeInfo<T>} attribute
|
||||
* @returns {Parsernostrum<DescribedType<T>>}
|
||||
* @returns {Parsernostrum<T>}
|
||||
*/
|
||||
static grammarFor(attribute, type = attribute?.type, defaultGrammar = this.unknownValue) {
|
||||
let result = defaultGrammar;
|
||||
@@ -3104,6 +3104,7 @@ class Grammar {
|
||||
: Parsernostrum.alt(acc, cur)
|
||||
);
|
||||
} else if (type instanceof MirroredEntity) {
|
||||
// @ts-expect-error
|
||||
return this.grammarFor(undefined, type.getTargetType())
|
||||
.map(v => new MirroredEntity(type.type, () => v))
|
||||
} else if (attribute?.constructor === Object) {
|
||||
@@ -6125,7 +6126,7 @@ class Serializer {
|
||||
} else {
|
||||
result += attributeSeparator;
|
||||
}
|
||||
if (attributes[key]?.inlined) {
|
||||
if (AttributeInfo.getAttribute(entity, key, "inlined")) {
|
||||
result += this.doWrite(
|
||||
value,
|
||||
insideString,
|
||||
@@ -6134,7 +6135,7 @@ class Serializer {
|
||||
attributeSeparator,
|
||||
false,
|
||||
attributeValueConjunctionSign,
|
||||
attributes[key].type instanceof Array
|
||||
AttributeInfo.getAttribute(entity, key, "type") instanceof Array
|
||||
? k => attributeKeyPrinter(`${keyValue}${k}`)
|
||||
: k => attributeKeyPrinter(`${keyValue}.${k}`)
|
||||
);
|
||||
|
||||
2
dist/ueblueprint.min.js
vendored
2
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -96,7 +96,7 @@ export default class Serializer {
|
||||
} else {
|
||||
result += attributeSeparator
|
||||
}
|
||||
if (attributes[key]?.inlined) {
|
||||
if (AttributeInfo.getAttribute(entity, key, "inlined")) {
|
||||
result += this.doWrite(
|
||||
value,
|
||||
insideString,
|
||||
@@ -105,7 +105,7 @@ export default class Serializer {
|
||||
attributeSeparator,
|
||||
false,
|
||||
attributeValueConjunctionSign,
|
||||
attributes[key].type instanceof Array
|
||||
AttributeInfo.getAttribute(entity, key, "type") instanceof Array
|
||||
? k => attributeKeyPrinter(`${keyValue}${k}`)
|
||||
: k => attributeKeyPrinter(`${keyValue}.${k}`)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user