Skip to content

Commit

Permalink
Fix: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
eight04 committed Oct 14, 2018
1 parent 05a87ed commit 05a6208
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion edit/editor-worker.js
@@ -1,5 +1,4 @@
/* global importScripts workerUtil CSSLint require metaParser */
/* exported editorWorker */
'use strict';

importScripts('/js/worker-util.js');
Expand Down
7 changes: 2 additions & 5 deletions edit/reroute-hotkeys.js
Expand Up @@ -14,10 +14,10 @@ const rerouteHotkeys = (() => {
'colorpicker',
]);

rerouteHotkeys(true);

return rerouteHotkeys;

// note that this function relies on `editor`. Calling this function before
// the editor is initialized may throw an error.
function rerouteHotkeys(enable, immediately) {
if (!immediately) {
debounce(rerouteHotkeys, 0, enable, true);
Expand All @@ -29,9 +29,6 @@ const rerouteHotkeys = (() => {
}

function rerouteHandler(event) {
if (typeof editor === 'undefined') {
return;
}
const keyName = CodeMirror.keyName(event);
if (!keyName) {
return;
Expand Down
10 changes: 7 additions & 3 deletions edit/sections-editor-section.js
Expand Up @@ -70,17 +70,21 @@ function createResizeGrip(cm) {
}

function createSection({
// data model
originalSection,
genId,
dirty,
// util
nextEditor,
prevEditor,
genId,
// emit events
// TODO: better names like `onRemoved`? Or make a real event emitter.
showMozillaFormatImport,
removeSection,
insertSectionAfter,
moveSectionUp,
moveSectionDown,
restoreSection,
nextEditor,
prevEditor
}) {
const sectionId = genId();
const el = template.section.cloneNode(true);
Expand Down

0 comments on commit 05a6208

Please sign in to comment.