File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change 1
- // flowchart, v1.1.2
1
+ // flowchart, v1.1.3
2
2
// Copyright (c)2013 Adriano Raiano (adrai).
3
3
// Distributed under MIT license
4
4
// http://adrai.github.io/flowchart.js
111
111
}
112
112
113
113
function _inherits ( ctor , superCtor ) {
114
- ctor . super_ = superCtor ;
115
- ctor . prototype = Object . create ( superCtor . prototype , {
116
- constructor : {
117
- value : ctor ,
118
- enumerable : false ,
119
- writable : true ,
120
- configurable : true
121
- }
122
- } ) ;
114
+ if ( typeof ( Object . create ) === 'function' ) {
115
+ // implementation from standard node.js 'util' module
116
+ ctor . super_ = superCtor ;
117
+ ctor . prototype = Object . create ( superCtor . prototype , {
118
+ constructor : {
119
+ value : ctor ,
120
+ enumerable : false ,
121
+ writable : true ,
122
+ configurable : true
123
+ }
124
+ } ) ;
125
+ } else {
126
+ // old school shim for old browsers
127
+ ctor . super_ = superCtor ;
128
+ var TempCtor = function ( ) { } ;
129
+ TempCtor . prototype = superCtor . prototype ;
130
+ ctor . prototype = new TempCtor ( ) ;
131
+ ctor . prototype . constructor = ctor ;
132
+ }
123
133
}
124
134
125
135
// move dependent functions to a container so that
You can’t perform that action at this time.
0 commit comments