Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 756ad2e

Browse files
committed
Исправлены ошибки js
1 parent 168e224 commit 756ad2e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

assets/DebugBar/js/initializer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ Ggrach.DebugBar = {
1010
window.addEventListener('keydown', Ggrach.Handlers.onKeyEsc, true);
1111
},
1212

13+
hasDebugBar: function () {
14+
return document.querySelector('.ggrach__debug_bar') !== null;
15+
},
16+
1317
init: function () {
1418

1519
document.addEventListener('DOMContentLoaded', function () {
16-
if (Ggrach.Utils.User.isAdmin())
20+
if (Ggrach.Utils.User.isAdmin() && Ggrach.DebugBar.hasDebugBar())
1721
{
1822
if (Ggrach.Utils.Screen.isMobile())
1923
{

0 commit comments

Comments
 (0)