diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-10-05 23:11:57 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-10-05 23:12:00 +0200 |
commit | 6ce4949df3cd9101893361ca8e34c4863087f932 (patch) | |
tree | d89e97f1396d6408d0850524483be338450976ff /packages/gitbook-core/src | |
parent | 0614613b8414d62a6150e58f55a53c985a83937c (diff) | |
download | gitbook-6ce4949df3cd9101893361ca8e34c4863087f932.zip gitbook-6ce4949df3cd9101893361ca8e34c4863087f932.tar.gz gitbook-6ce4949df3cd9101893361ca8e34c4863087f932.tar.bz2 |
Add "url" to file
Diffstat (limited to 'packages/gitbook-core/src')
-rw-r--r-- | packages/gitbook-core/src/models/File.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/gitbook-core/src/models/File.js b/packages/gitbook-core/src/models/File.js index 6f44700..03032a1 100644 --- a/packages/gitbook-core/src/models/File.js +++ b/packages/gitbook-core/src/models/File.js @@ -4,13 +4,14 @@ const { Record } = require('immutable'); const DEFAULTS = { type: '', mtime: new Date(), - path: '' + path: '', + url: '' }; class File extends Record(DEFAULTS) { constructor(file = {}) { if (typeof file === 'string') { - file = { path: file }; + file = { path: file, url: file }; } super({ |