Skip to content

Commit

Permalink
Fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Feb 18, 2022
1 parent 67e2cf3 commit f7f5967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/stimulus-loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function registerControllerFromPath(path, under, application) {
.replace(/\//g, "--")
.replace(/_/g, "-")

if !(name in registeredControllers) {
if (!(name in registeredControllers)) {
import(path)
.then(module => registerController(name, module, application))
.catch(error => console.error(`Failed to register controller: ${name} (${path})`, error))
Expand Down Expand Up @@ -66,7 +66,7 @@ function extractControllerNamesFrom(element) {
}

function loadController(name, under, application) {
if !(name in registeredControllers) {
if (!(name in registeredControllers)) {
import(controllerFilename(name, under))
.then(module => registerController(name, module, application))
.catch(error => console.error(`Failed to autoload controller: ${name}`, error))
Expand Down

0 comments on commit f7f5967

Please sign in to comment.