Skip to content

Commit a184f8f

Browse files
authored
Merge pull request #467 from smartdevicelink/bugfix/scm-get-templates-crash
Do a null check for the templates available in the window capability
2 parents ae3a998 + 5ec2b86 commit a184f8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/js/src/manager/SystemCapabilityManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ class SystemCapabilityManager extends _SubManagerBase {
734734
}
735735

736736
// Ford Sync bug returning incorrect template name for "NON-MEDIA" https://github.com/smartdevicelink/sdl_javascript_suite/issues/450
737-
const templatesAvailable = defaultMainWindow.getTemplatesAvailable();
737+
const templatesAvailable = defaultMainWindow.getTemplatesAvailable() !== null ? defaultMainWindow.getTemplatesAvailable() : [];
738738
for (let index = 0; index < templatesAvailable.length; index++) {
739739
if (templatesAvailable[index] === 'NON_MEDIA') {
740740
templatesAvailable[index] = 'NON-MEDIA';

0 commit comments

Comments
 (0)