luci-base: luci.js: fix undefined variable access in Request.request()
authorJo-Philipp Wich <jo@mein.io>
Thu, 11 Nov 2021 18:55:18 +0000 (19:55 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 15 Feb 2022 23:37:54 +0000 (00:37 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit de4c4f7fd445e7a59691e50edead472900270e59)

modules/luci-base/htdocs/luci-static/resources/luci.js

index b06688ea29421891b97179e649fe8872b221baa6..2cc4a701f503af709d3981515a250d49d13128a2 100644 (file)
                                if (opt.content != null) {
                                        switch (typeof(opt.content)) {
                                        case 'function':
-                                               content = opt.content(xhr);
+                                               content = opt.content(opt.xhr);
                                                break;
 
                                        case 'object':