Skip to content

Commit 89c8256

Browse files
Soy Authorscopybara-github
authored andcommitted
internal
PiperOrigin-RevId: 800993921
1 parent 6e858eb commit 89c8256

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

javascript/soyutils_usegoog.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const {compareBigInt} = goog.require('google3.javascript.common.bigint.index');
4242
const {defaultImmutableInstance} = goog.require('jspb.immutable_message');
4343
const {htmlSafeByReview} = goog.require('google3.third_party.javascript.safevalues.restricted.reviewed');
4444
const {isReadonly} = goog.require('google3.javascript.apps.jspb.types.is_readonly');
45+
const {setInNonRenderContext} = goog.require('google3.javascript.apps.wiz.tsx.runtime.hooks.non_render_context');
4546

4647
// -----------------------------------------------------------------------------
4748
// soydata: Defines typed strings, e.g. an HTML string `"a<b>c"` is
@@ -555,7 +556,11 @@ const $$isTruthyNonEmpty = function(arg) {
555556
* @return {boolean}
556557
*/
557558
const $$hasContent = function(arg) {
558-
return $$isTruthyNonEmpty(arg);
559+
let result = true;
560+
setInNonRenderContext(true);
561+
result = $$isTruthyNonEmpty(arg);
562+
setInNonRenderContext(false);
563+
return result;
559564
};
560565

561566

0 commit comments

Comments
 (0)