mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Rename isEqual to isArrayEqual
This commit is contained in:
parent
3bbe53a58e
commit
23a71b433e
@ -88,7 +88,7 @@ $tw.utils.each = function(object,callback) {
|
|||||||
/*
|
/*
|
||||||
Check if an array is equal by value and by reference.
|
Check if an array is equal by value and by reference.
|
||||||
*/
|
*/
|
||||||
$tw.utils.isEqual = function(array1,array2) {
|
$tw.utils.isArrayEqual = function(array1,array2) {
|
||||||
if(array1 === array2) { return true; }
|
if(array1 === array2) { return true; }
|
||||||
array1 = array1 || []; array2 = array2 || [];
|
array1 = array1 || []; array2 = array2 || [];
|
||||||
if(array1.length !== array2.length) { return false; }
|
if(array1.length !== array2.length) { return false; }
|
||||||
@ -802,7 +802,7 @@ $tw.Tiddler.prototype.isModified = function() {
|
|||||||
var ignoredFields = ["created", "modified", "title", "draft.title", "draft.of", "tags"],
|
var ignoredFields = ["created", "modified", "title", "draft.title", "draft.of", "tags"],
|
||||||
tiddler = this,
|
tiddler = this,
|
||||||
origTiddler = $tw.wiki.getTiddler(this.fields["draft.of"]);
|
origTiddler = $tw.wiki.getTiddler(this.fields["draft.of"]);
|
||||||
if(!$tw.utils.isEqual(tiddler.fields.tags,origTiddler.fields.tags)) {
|
if(!$tw.utils.isArrayEqual(tiddler.fields.tags,origTiddler.fields.tags)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !Object.keys(tiddler.fields).every(function(field) {
|
return !Object.keys(tiddler.fields).every(function(field) {
|
||||||
|
Loading…
Reference in New Issue
Block a user