started migrating to nw0.13.x

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-04-08 19:28:38 +03:00
parent b266982838
commit 6e8a33ad0d
3 changed files with 9 additions and 6 deletions

View File

@ -184,11 +184,14 @@ module.AppControl = core.ImageGridFeatures.Feature({
// XXX get this from the viewer...
.replace('${VERSION}', this.version || 'gen4')
.replace('${FILENAME}',
(img.name
|| img.path.replace(/\.[\\\/]/, '')))
img ?
(img.name || img.path.replace(/\.[\\\/]/, ''))
: '')
.replace('${PATH}',
(img.base_path || '.')
+'/'+ img.path.replace(/\.[\\\/]/, ''))
img ?
(img.base_path || '.')
+'/'+ img.path.replace(/\.[\\\/]/, '')
: '')
/*
.replace('${DIR}',
pathlib.dirname((img.base_path || '.')

View File

@ -104,7 +104,7 @@ var MetadataReaderActions = actions.Actions({
var gid = this.data.getImage(image)
var img = this.images && this.images[gid]
if(!image){
if(!image || !img){
return
}

View File

@ -25,7 +25,7 @@
"glob": "^4.0.6",
"guarantee-events": "^1.0.0",
"promise": "^6.0.1",
"requirejs": "*",
"requirejs": "^2.1.23",
"sharp": "^0.12.0"
},
"preferGlobal": true,