Skip to content

Commit

Permalink
Use null as plugin name for plugins with no <name>
Browse files Browse the repository at this point in the history
Apparently some plugins don't have a <name> tag. Check for this and use
set the name to null for them in PluginInfo.
  • Loading branch information
kamrik committed May 9, 2014
1 parent 3e468db commit 3fd257d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cordova-lib/src/PluginInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ function PluginInfo(dirname) {
self.id = et.getroot().attrib.id;
self.version = et.getroot().attrib.version;

self.name = et.find('name').text;
var nameTag = et.find('name');
self.name = nameTag ? nameTag.text : null;

self.deps = {};
et.findall('dependency').forEach(function (d) {
self.deps[d.attrib.id] = _.clone(d.attrib);
Expand Down

0 comments on commit 3fd257d

Please sign in to comment.