From b917cbe08fb54b87fc880c96d0be0faa2bbefbe1 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 17 Apr 2016 12:17:59 +0000 Subject: [PATCH] How did this ever work? git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3208 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/core.js | 2 +- packages/cory/ui/ui.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/core.js b/core/core.js index 9b7c182f..e8873da9 100644 --- a/core/core.js +++ b/core/core.js @@ -331,7 +331,7 @@ function getProcess(packageOwner, packageName, key, options) { let source = {}; for (let i in manifest.require) { let name = manifest.require[i]; - source[manifest[i]] = File.readFile("packages/" + process.packageOwner + "/" + name + "/" + name + ".js"); + source[name] = File.readFile("packages/" + process.packageOwner + "/" + name + "/" + name + ".js"); } process.task.setRequires(source); } diff --git a/packages/cory/ui/ui.js b/packages/cory/ui/ui.js index e7d35d1c..1fe96363 100644 --- a/packages/cory/ui/ui.js +++ b/packages/cory/ui/ui.js @@ -5,7 +5,8 @@ function fileList(settings) { terminal.setEcho(false); terminal.clear(); terminal.print(settings.title); - if (core.user.credentials.permissions.authenticated) { + if (core.user.credentials.permissions + && core.user.credentials.permissions.authenticated) { terminal.print({command: "new"}); } @@ -79,7 +80,8 @@ function fileList(settings) { }); for (var i = 0; i < entries.length; i++) { if (entries[i].substring(0, prefix.length) == prefix) { - if (core.user.credentials.permissions.authenticated) { + if (core.user.credentials.permissions + && core.user.credentials.permissions.authenticated) { terminal.print( "* ", {style: "font-weight: bold", value: {command: "open:" + entries[i], value: entries[i].substring(prefix.length)}},