Skip to content

Commit cec0d48

Browse files
authored
live_tests.js -- shut up random live test error
1 parent 47325b6 commit cec0d48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blocks_vertical/live_tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Blockly.FieldCustom.registerInput(
207207
'TEST_BUTTON',
208208
(() => {
209209
const div = document.createElement("div");
210-
div.setAttribute("style", `width: 32px; height: 32px; padding: 6px 10px; border-radius: 4px; border: solid 1px #00000030;`);
210+
div.setAttribute("style", `width: 32px; height: 32px; padding: 6px 10px; text-align: center; font-weight: 500; border-radius: 4px; border: solid 1px #00000030;`);
211211
return div;
212212
})(),
213213
(field, input) => {
@@ -216,7 +216,7 @@ Blockly.FieldCustom.registerInput(
216216

217217
input.textContent = "alert";
218218
input.style.width = "max-content";
219-
input.style.color = srcBlock.textColor ? srcBlock.textColor : "#fff";
219+
input.style.color = srcBlock && srcBlock.textColor ? srcBlock.textColor : "#fff";
220220

221221
const properWidth = goog.style.getSize(input).width;
222222
input.style.width = properWidth + "px";

0 commit comments

Comments
 (0)