Skip to content

Commit 290a183

Browse files
Shakeh BrysShakeh Brys
authored andcommitted
minor updates
1 parent f97da66 commit 290a183

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

GruntfileMms.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@
44
module.exports = function(grunt) {
55
require('jit-grunt')(grunt);
66

7+
var combineCustomJS = {
8+
options: {
9+
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd HH:MM:ss") %> */\n',
10+
wrap: 'mms',
11+
mangle: true,
12+
sourceMap: {
13+
includeSources: true
14+
}
15+
},
16+
files: {
17+
'dist/mms.js': ['src/mms.js', 'src/services/*.js'],
18+
'dist/mms.directives.js': ['src/mms.directives.js', 'src/directives/**/*.js']
19+
}
20+
};
21+
722
grunt.initConfig({
823
pkg: grunt.file.readJSON('package.json'),
924

@@ -28,6 +43,12 @@ module.exports = function(grunt) {
2843
dest: 'dist/temp/js/mms.directives.tpls.js'
2944
}
3045
},
46+
47+
// concat only (no minification )
48+
concat: {
49+
combineCustomJS: combineCustomJS
50+
},
51+
3152
uglify: {
3253
options: {
3354
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd HH:MM:ss") %> */\n',
@@ -65,5 +86,5 @@ module.exports = function(grunt) {
6586
clean: ['dist/temp']
6687
});
6788

68-
grunt.registerTask('default', ['html2js', 'uglify', 'clean']);
89+
grunt.registerTask('default', ['html2js', 'concat', 'clean']);
6990
};

src/directives/Utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,10 @@ function Utils($q, $uibModal, $timeout, $templateCache, $rootScope, $compile, $w
827827
* @param {String} transcludeType name, documentation, or value
828828
*/
829829
var reopenUnsavedElts = function(scope, transcludeType){
830-
var unsavedEdits = scope.$root.ve_edits;
830+
var unsavedEdits = {};
831+
if (scope.$root.ve_edits) {
832+
unsavedEdits = scope.$root.ve_edits;
833+
}
831834
var key = scope.element.id + '|' + scope.element._projectId + '|' + scope.element._refId;
832835
var thisEdits = unsavedEdits[key];
833836
if (!thisEdits || scope.commitId !== 'latest') {

0 commit comments

Comments
 (0)