Update sandbox.html

This commit is contained in:
Ian Stanion
2023-06-29 17:34:42 -04:00
parent c3f7c5d3ad
commit 36f466966f

View File

@@ -61,9 +61,7 @@ limitations under the License.
result = 'invalid request';
// if we don't know the templateName requested, return an error message
if !(template) {
result = 'Unknown template: ' + event.data.templateName;
} else {
if (template) {
switch (command) {
case 'render':
result = template(event.data.context);
@@ -75,6 +73,8 @@ limitations under the License.
// result = template(event.data.context);
// break;
}
} else {
result = 'Unknown template: ' + event.data.templateName;
}
event.source.postMessage({ result: result }, event.origin);
});