Skip to content

Commit

Permalink
fix(*): fix cherry overflow & fix customHook could config params on t…
Browse files Browse the repository at this point in the history
…he Cherry config (#61)
  • Loading branch information
humyfred authored Dec 11, 2021
1 parent 8b08ba3 commit 1e24f12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/HookCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default class HookCenter {
register(HookClass, editorConfig, customHookConfig) {
// filter Configs Here
const { externals, engine } = editorConfig;
const { syntax } = engine;
const { syntax, customSyntax } = engine;
let instance;
let hookName;
// 首先校验Hook是否合法
Expand All @@ -164,7 +164,7 @@ export default class HookCenter {
}
} else {
hookName = /** @type {typeof SyntaxBase}*/ (HookClass).HOOK_NAME;
const config = syntax[hookName] ? syntax[hookName] : {};
const config = syntax[hookName] ? syntax[hookName] : customSyntax[hookName] ? customSyntax[hookName] : {};
instance = new /** @type {typeof SyntaxBase}*/ (HookClass)({ externals, config, globalConfig: engine.global });
}
// Skip Internal Hook
Expand Down
2 changes: 1 addition & 1 deletion src/sass/cherry.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
height: 100%;
min-height: 400px;
position: relative;
overflow: hidden;
// overflow: hidden;

.cherry-editor,
.cherry-previewer {
Expand Down

0 comments on commit 1e24f12

Please sign in to comment.