mirror of
https://github.com/discourse/discourse.git
synced 2025-06-20 17:51:34 +08:00
FIX: Tests were broken in Firefox (#12456)
There are a lot of little fixes to tests here, but the biggest issue was too much recursion because we kept replacing the helpers over and over again. I assume Chrome has tail recursion or something to speed this up but Firefox hated it. Otherwise, we can't rely on the order of attributes in rendered HTML so I simplified most of those tests to just look for key strings in the HTML that are rendered.
This commit is contained in:
@ -8,6 +8,10 @@ export function registerRawHelpers(hbs, handlebarsClass) {
|
||||
if (!hbs.helpers) {
|
||||
hbs.helpers = Object.create(handlebarsClass.helpers);
|
||||
}
|
||||
if (hbs.__helpers_registered) {
|
||||
return;
|
||||
}
|
||||
hbs.__helpers_registered = true;
|
||||
|
||||
hbs.helpers["get"] = function (context, options) {
|
||||
if (!context || !options.contexts) {
|
||||
|
Reference in New Issue
Block a user