diff --git a/core/includes/common.inc b/core/includes/common.inc index 2987b63..bf896c1 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -1526,10 +1526,7 @@ function _drupal_add_js($data = NULL, $options = NULL) { $current_query = \Drupal::service('request_stack')->getCurrentRequest()->query->all(); url('', array('script' => &$scriptPath, 'prefix' => &$pathPrefix)); $current_path = current_path(); - $current_path_is_admin = FALSE; - if (!(defined('MAINTENANCE_MODE'))) { - $current_path_is_admin = FALSE; - } + $current_path_is_admin = \Drupal::service('router.admin_context')->isAdminRoute(); $path = array( 'basePath' => base_path(), 'scriptPath' => $scriptPath,