Release 11.2.2
This commit is contained in:
parent
74c881bb5b
commit
3b0d0343f4
2
dist
2
dist
@ -1 +1 @@
|
||||
Subproject commit 5ab60028ce3cdabbefcce00a217155d9a209a0f6
|
||||
Subproject commit 653a436b8874ea2fd329404f1bd92fd3c808595e
|
@ -48,8 +48,8 @@ module.exports = function (gulp, helperOptions) {
|
||||
.pipe(source(options.targetName))
|
||||
.pipe(buffer())
|
||||
.pipe($.sourcemaps.init({loadMaps: true}))
|
||||
.pipe($.if(!options.debug, $.uglify().on('error', function(e) {
|
||||
console.log('\x07',e.message, JSON.stringify(e)); return this.end()
|
||||
.pipe($.if(!options.debug, $.uglify().on('error', function (e) {
|
||||
console.log('\x07', e.message, JSON.stringify(e)); return this.end()
|
||||
})))
|
||||
.pipe($.sourcemaps.write('.'))
|
||||
.pipe(gulp.dest('./dist/')))
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "11.2.1",
|
||||
"version": "11.2.2",
|
||||
"description": "A framework for real-time p2p shared editing on arbitrary complex data types",
|
||||
"main": "./src/y.js",
|
||||
"scripts": {
|
||||
|
@ -27,20 +27,19 @@ g.g = g
|
||||
// Helper methods for the random number generator
|
||||
Math.seedrandom = require('seedrandom')
|
||||
|
||||
g.generateRandomSeed = function generateRandomSeed() {
|
||||
g.generateRandomSeed = function generateRandomSeed () {
|
||||
var seed
|
||||
if (typeof window != 'undefined' && window.location.hash.length > 1) {
|
||||
if (typeof window !== 'undefined' && window.location.hash.length > 1) {
|
||||
seed = window.location.hash.slice(1) // first character is the hash!
|
||||
console.warn('Using random seed that was specified in the url!')
|
||||
} else {
|
||||
seed = JSON.stringify(Math.random())
|
||||
}
|
||||
console.info('Using random seed: ' + seed)
|
||||
setRandomSeed(seed)
|
||||
|
||||
g.setRandomSeed(seed)
|
||||
}
|
||||
|
||||
g.setRandomSeed = function setRandomSeed(seed) {
|
||||
g.setRandomSeed = function setRandomSeed (seed) {
|
||||
Math.seedrandom.currentSeed = seed
|
||||
Math.seedrandom(Math.seedrandom.currentSeed, { global: true })
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ module.exports = function (Y /* : any*/) {
|
||||
this.onevent(op)
|
||||
} else if (op.struct === 'Delete') {
|
||||
var self = this
|
||||
function checkDelete (d) {
|
||||
var checkDelete = function checkDelete (d) {
|
||||
if (d.length == null) {
|
||||
throw new Error('This shouldn\'t happen! d.length must be defined!')
|
||||
}
|
||||
@ -205,7 +205,7 @@ module.exports = function (Y /* : any*/) {
|
||||
*/
|
||||
if (iEnd < dEnd) {
|
||||
// Case 7
|
||||
debugger
|
||||
// debugger // TODO: You did not test this case yet!!!! (add the debugger here)
|
||||
self.waiting.splice(w, 1)
|
||||
checkDelete({
|
||||
target: [d.target[0], dStart],
|
||||
@ -336,7 +336,7 @@ module.exports = function (Y /* : any*/) {
|
||||
break
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < dels.length; i++) {
|
||||
for (i = 0; i < dels.length; i++) {
|
||||
if (this.awaiting === 0) {
|
||||
this.onevent(dels[i])
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user