Don't try to add an album if the user cancels
This commit is contained in:
parent
234a814112
commit
ae51d825ef
@ -37,11 +37,14 @@ export function GalleryView(vm, model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addAlbum() {
|
function addAlbum() {
|
||||||
const a = new AlbumType({
|
const albumName = prompt('Album Name');
|
||||||
title: prompt('Album Name'),
|
if (albumName && albumName.trim()) {
|
||||||
members: []
|
const a = new AlbumType({
|
||||||
});
|
title: albumName.trim(),
|
||||||
a.save();
|
count: 0
|
||||||
|
});
|
||||||
|
a.save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
routeChanged.subscribe(function onRouteChange(router, route) {
|
routeChanged.subscribe(function onRouteChange(router, route) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user