From 4ec4ddb2a111f9b59e594ff0dd31954adc680a6f Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 23 Mar 2023 11:55:17 +0100 Subject: [PATCH] * WebAuthN: fix not working registration of new authentication devices or browsers generally prefer app.min.js over old, pre RollupJS app.js --- api/src/Framework.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/src/Framework.php b/api/src/Framework.php index 663d99bec5..e8e930f375 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -1479,6 +1479,13 @@ abstract class Framework extends Framework\Extra */ static function includeJS($package, $file=null, $app='api', $append=true) { + // prefer app.min.js over old, pre RollupJS app.js + if ($package[0] === '/' && substr($package, -7) === '/app.js' && + self::$js_include_mgr->include_js_file(substr($package, 0, -3).'.min.js', $file, $app, $append) || + $file === 'app' && self::$js_include_mgr->include_js_file($package, 'app.min', $app, $append)) + { + return; + } self::$js_include_mgr->include_js_file($package, $file, $app, $append); }