update shared components

This commit is contained in:
Luke Pulverenti 2016-02-22 13:25:45 -05:00
parent 912bd57ca0
commit 39fe608c2d
7 changed files with 122 additions and 62 deletions

View file

@ -2,23 +2,19 @@ define([], function () {
return function (options) {
return new Promise(function (resolve, reject) {
if (typeof options === 'string') {
options = {
label: '',
text: options
};
}
if (typeof options === 'string') {
options = {
label: '',
text: options
};
}
var result = prompt(options.label || '', options.text || '');
if (result) {
resolve(result);
} else {
reject(result);
}
});
var result = prompt(options.label || '', options.text || '');
if (result) {
return Promise.resolve(result);
} else {
return Promise.reject(result);
}
};
});