cordo 2.2.3 → 2.2.4
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/package.json +1 -1
- package/src/components/component.ts +2 -2
- package/src/components/modifier.ts +1 -1
- package/src/core/files/config.ts +1 -1
- package/src/core/files/error-boundary.ts +1 -1
- package/src/core/files/route.ts +1 -1
- package/src/core/interaction.ts +1 -1
- package/src/functions/funct.ts +1 -1
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { readModifier, type CordoModifier } from "./modifier"
|
|
|
4
4
|
import type { AllowedComponents as ContainerAllowedComponents } from "./builtin/container"
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
const CordoComponentSymbol = Symbol('CordoComponent')
|
|
7
|
+
const CordoComponentSymbol = Symbol.for('CordoComponent')
|
|
8
8
|
|
|
9
9
|
export const ComponentType = {
|
|
10
10
|
ActionRow: 1,
|
|
@@ -112,7 +112,7 @@ export function renderComponentList(
|
|
|
112
112
|
|
|
113
113
|
if (!isComponent(item)) {
|
|
114
114
|
const mod = readModifier(item)
|
|
115
|
-
if (!modifiers.some(m => m.name === mod.name))
|
|
115
|
+
if (mod && !modifiers.some(m => m.name === mod.name))
|
|
116
116
|
modifiers.push(mod)
|
|
117
117
|
continue
|
|
118
118
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CordoComponentPayload, renderComponentList, StringComponentType } from "./component"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
const CordoModifierSymbol = Symbol('CordoModifier')
|
|
4
|
+
const CordoModifierSymbol = Symbol.for('CordoModifier')
|
|
5
5
|
|
|
6
6
|
export type CordoModifier = {
|
|
7
7
|
[CordoModifierSymbol]: {
|
package/src/core/files/config.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { parseFlags as runParseFlags, type FlagOpts as RunFlagOpts } from '../..
|
|
|
9
9
|
import { parseFlags as gotoParseFlags, type FlagOpts as GotoFlagOpts } from '../../functions/impl/goto'
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
const CordoConfigSymbol = Symbol('
|
|
12
|
+
const CordoConfigSymbol = Symbol.for('CordoConfig')
|
|
13
13
|
|
|
14
14
|
type HookFor<T, Context = never> = null | ((value: T, context: Context) => Promisable<T | null>)
|
|
15
15
|
type TransformHookFor<T, Context = never> = null | ((value: T, context: Context) => T)
|
|
@@ -2,7 +2,7 @@ import { CordoError } from "../../errors"
|
|
|
2
2
|
import type { RouteRequest } from "./route"
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
const CordoErrorBoundarySymbol = Symbol('CordoErrorBoundary')
|
|
5
|
+
const CordoErrorBoundarySymbol = Symbol.for('CordoErrorBoundary')
|
|
6
6
|
|
|
7
7
|
export type CordoErrorBoundary = {
|
|
8
8
|
[CordoErrorBoundarySymbol]: typeof CordoErrorBoundarySymbol
|
package/src/core/files/route.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { CordoComponent } from "../../components/component"
|
|
|
6
6
|
import type { CordoModifier } from "../../components/modifier"
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
const CordoRouteSymbol = Symbol('CordoRoute')
|
|
9
|
+
const CordoRouteSymbol = Symbol.for('CordoRoute')
|
|
10
10
|
|
|
11
11
|
export type RouteResponse = Array<CordoComponent | CordoModifier>
|
|
12
12
|
|
package/src/core/interaction.ts
CHANGED