revert to more graceful template structure check (#12699)

This commit is contained in:
Shelley Vohr 2018-04-24 11:21:26 -04:00 committed by GitHub
parent 9c65abd746
commit 7c4964fae6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,7 +154,7 @@ Menu.setApplicationMenu = function (menu) {
}
Menu.buildFromTemplate = function (template) {
if (!(template instanceof Array)) {
if (!Array.isArray(template)) {
throw new TypeError('Invalid template for Menu')
}