mirror of
https://github.com/scratchfoundation/scratch-analysis.git
synced 2025-05-15 15:20:27 -04:00
Don't set origin at all if it doesn't exist.
This commit is contained in:
parent
26ff6d7265
commit
22d822d1f8
2 changed files with 6 additions and 4 deletions
|
@ -126,9 +126,11 @@ const extensions = function (list) {
|
|||
};
|
||||
|
||||
const metadata = function (meta) {
|
||||
return {
|
||||
origin: meta.origin ? meta.origin : ''
|
||||
};
|
||||
let obj = {};
|
||||
if (meta.origin) {
|
||||
obj.origin = meta.origin;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
module.exports = function (project, callback) {
|
||||
|
|
|
@ -140,7 +140,7 @@ test('defalt (binary)', t => {
|
|||
t.deepEqual(result.extensions.id, []);
|
||||
|
||||
t.type(result.meta, 'object');
|
||||
t.equal(result.meta.origin, '');
|
||||
t.deepEqual({}, result.meta);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue