Simplify Current JS implementation
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
import { current } from "helpers"
|
||||
|
||||
export default class extends Controller {
|
||||
static classes = [ "myComment" ]
|
||||
@@ -9,6 +8,6 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
get #myComments() {
|
||||
return this.element.querySelectorAll(`.comment[data-creator-id='${current.user.id}']`)
|
||||
return this.element.querySelectorAll(`.comment[data-creator-id='${Current.user.id}']`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user