Skip to content
This repository was archived by the owner on Mar 25, 2020. It is now read-only.

Conversation

@psigen
Copy link

@psigen psigen commented Sep 27, 2015

This adds a missing [key] reference to the beforeUpdate() hook that handles setting successfully updated file IDs. This matches the corresponding access in beforeInsert() on line 69 of the same file:
https://github.com/aldeed/meteor-cfs-autoform/blob/master/cfs-autoform-hooks.js#L69

This fixes an issue where uploading files using the cfs-files autoform type would lead to the following exception:

Exception in setTimeout callback: TypeError: CfsAutoForm.Util.deepFind(...).push is not a function
    at cb (http://localhost:3000/packages/cfs_autoform.js?0ada60c40a71ab26e12c4e697f33af05c95f1749:329:51)
    at null.<anonymous> (http://localhost:3000/packages/cfs_autoform.js?0ada60c40a71ab26e12c4e697f33af05c95f1749:382:13)
    at http://localhost:3000/packages/raix_eventemitter.js?9dbc8f21550d5b0e800bfa809850f28136f1deb6:131:16
    at Array.forEach (native)
    at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?fa590de5090ceb4a42555b48562fd8f8e7035758:157:11)
    at _runCallbacks (http://localhost:3000/packages/raix_eventemitter.js?9dbc8f21550d5b0e800bfa809850f28136f1deb6:127:7)
    at EventEmitter.emit (http://localhost:3000/packages/raix_eventemitter.js?9dbc8f21550d5b0e800bfa809850f28136f1deb6:159:26)
    at oneChunkQueueEnded [as onEnded] (http://localhost:3000/packages/cfs_upload-http.js?40a85d8630caaae705a0a84cc6989fc98fda8487:511:19)
    at PowerQueue.next (http://localhost:3000/packages/cfs_power-queue.js?c62bc29a130805fdc29f80982e4cb5ebc5467dea:479:14)
    at http://localhost:3000/packages/cfs_power-queue.js?c62bc29a130805fdc29f80982e4cb5ebc5467dea:573:12

This adds a missing `[key]` reference to the `beforeUpdate()` hook that handles setting successfully updated file IDs.  This now matches the corresponding access in `beforeInsert()` on line 69 of the same file:

https://github.com/aldeed/meteor-cfs-autoform/blob/master/cfs-autoform-hooks.js#L69
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant