native-document 1.0.195 → 1.0.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-document",
3
- "version": "1.0.195",
3
+ "version": "1.0.197",
4
4
  "description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
5
5
  "author": "AfroCodeur <https://github.com/afrocodeur>",
6
6
  "license": "MIT",
@@ -280,4 +280,5 @@ FileImagePreviewMode.prototype.portraitRatio = function() {
280
280
  */
281
281
  FileImagePreviewMode.prototype.previewSourceFrom = function(observable) {
282
282
  this.$description.previewSourceFrom = observable;
283
+ return this;
283
284
  };
@@ -112,4 +112,5 @@ FileWallMode.prototype.renderAdd = function(fn) {
112
112
  */
113
113
  FileWallMode.prototype.previewItemsFrom = function(observable) {
114
114
  this.$description.previewItemsFrom = observable;
115
+ return this;
115
116
  };
@@ -22,7 +22,7 @@ export const formatSize = (bytes) => {
22
22
 
23
23
  export const getFileThumbnail = (file, fieldInstance) => {
24
24
  const isImage = file.type?.startsWith('image/') || !!file.url;
25
- const url = URL.createObjectURL(file);
25
+ const url = file.url ?? URL.createObjectURL(file);
26
26
  if(isImage) {
27
27
  return Img(url, {
28
28
  class: 'file-item-img',