fix: bug fixes
This commit is contained in:
parent
671d5b6a15
commit
2ae9c5d7dc
@ -10,6 +10,7 @@ import useEntries from './lib/hooks/useEntries';
|
||||
import useHasChildErrors from './lib/hooks/useHasChildErrors';
|
||||
import useMediaFiles from './lib/hooks/useMediaFiles';
|
||||
import useFolderSupport from './lib/hooks/useFolderSupport';
|
||||
import { currentBackend } from './backend';
|
||||
|
||||
export * from './backends';
|
||||
export * from './interface';
|
||||
@ -20,6 +21,7 @@ export * from './widgets';
|
||||
const CMS = {
|
||||
...Registry,
|
||||
init: bootstrap,
|
||||
currentBackend,
|
||||
};
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
|
@ -583,8 +583,7 @@ export async function invokeEvent(event: {
|
||||
console.info(
|
||||
`[StaticCMS] Firing change event for field "${field}" for${
|
||||
event.file ? ` "${event.file}" file in` : ''
|
||||
} "${collection}" collection, new value:`,
|
||||
data,
|
||||
} "${collection}" collection`,
|
||||
);
|
||||
const collectionHandlers = registry.eventHandlers[name][collection] ?? {};
|
||||
|
||||
@ -790,7 +789,7 @@ export function getAdditionalLink(id: string): AdditionalLink | undefined {
|
||||
* Markdown editor shortcodes
|
||||
*/
|
||||
export function registerShortcode<P = {}>(name: string, config: ShortcodeConfig<P>) {
|
||||
if (registry.backends[name]) {
|
||||
if (registry.shortcodes[name]) {
|
||||
console.error(`Shortcode [${name}] already registered. Please choose a different name.`);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user