diff --git a/config.js b/config.js
index 1a7584accb991eae8a0d2531e4dc24136235cfe8..6ee5b97e42a595eb52bc9e9097c58dde2b4c6a97 100644
--- a/config.js
+++ b/config.js
@@ -1,3 +1,5 @@
+/*global ks_global*/
+
 export const COLOR_PALETTE = [
     "rgb(104, 169, 77)",
     "rgb(102, 75, 154)",
diff --git a/datasets/datasets.js b/datasets/datasets.js
index 3ce3208d13ac9030aa5e908534dba4ffdcc0b4be..1e8c58909c335ede6064dedf78383c394710ae98 100644
--- a/datasets/datasets.js
+++ b/datasets/datasets.js
@@ -1,4 +1,5 @@
-import { PLUGIN_PATH } from "../config";
+/*global ks_global*/
+
 import jQuery from "jquery";
 
 /**
@@ -55,9 +56,11 @@ export function listAllSpaces() {
         action: "list_spaces",
     };
 
-    return jQuery.ajax({
-        type: "POST",
-        url: ks_global.ajax_url,
-        data: payload,
-    }).then((data) => JSON.parse(data)["spaces"]);
+    return jQuery
+        .ajax({
+            type: "POST",
+            url: ks_global.ajax_url,
+            data: payload,
+        })
+        .then((data) => JSON.parse(data)["spaces"]);
 }
diff --git a/knowledge-space.php b/knowledge-space.php
index 28e0b4c3f3aebc944470b1531423927ada1a8483..783d2afe7f686add29688c5e0ab3899ab41ca503 100644
--- a/knowledge-space.php
+++ b/knowledge-space.php
@@ -15,7 +15,7 @@ function ks_add_graph($atts = []): string
 
     $script_path = 'build' . DIRECTORY_SEPARATOR . $GLOBALS['build'] . DIRECTORY_SEPARATOR . 'graph.js';
     wp_enqueue_script("ks-display-js", plugins_url($script_path, __FILE__), array('jquery'), false);
-    ks_localize("ks-display-js");
+    ks_localize("ks-display-js", $atts);
 
     return $div;
 }
@@ -25,7 +25,7 @@ function ks_echo_graph($atts = []): void
     echo ks_add_graph($atts);
 }
 
-function ks_localize($handle)
+function ks_localize($handle, $atts)
 {
     $space_id = kg_get_space_id_from_atts($atts);
     $plugin_dir = plugin_dir_url(__FILE__);