diff --git a/README.md b/README.md
index 9e8d61105..0465f8016 100755
--- a/README.md
+++ b/README.md
@@ -147,7 +147,7 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
## Changelog ##
-### 4.6.1 [April 8, 2020] ###
+### 4.6.1 [April 9, 2020] ###
* Enhancement
* Disable the terms of service checkbox when the activity is published
diff --git a/app/assets/js/rtm-upload-terms.js b/app/assets/js/rtm-upload-terms.js
index 845a8129a..e4b6e942c 100755
--- a/app/assets/js/rtm-upload-terms.js
+++ b/app/assets/js/rtm-upload-terms.js
@@ -15,10 +15,14 @@ if ( 'object' === typeof rtMediaHook ) {
* @return {boolean}
*/
rtMediaHook.register( 'rtmedia_js_before_upload', function ( args ) {
- if ( false === args || 'undefined' === typeof args.uploader.settings.multipart_params || 'undefined' === typeof args.src ) {
+ if ( ! args ) {
return args;
}
+ if ( 'undefined' === typeof args.uploader || 'undefined' === typeof args.uploader.settings || 'undefined' === typeof args.uploader.settings.multipart_params || 'undefined' === typeof args.src ) {
+ return ( 'boolean' === typeof args ? args : true );
+ }
+
var multipart_params = args.uploader.settings.multipart_params;
var request_key = false;
var terms_key = false;
@@ -72,7 +76,7 @@ if ( 'object' === typeof rtMediaHook ) {
* @return {boolean}
*/
rtMediaHook.register( 'rtmedia_js_upload_file', function ( args ) {
- if ( false === args ) {
+ if ( ! args ) {
return args;
}
@@ -120,7 +124,7 @@ if ( 'object' === typeof rtMediaHook ) {
}
if ( ! isTermsEnabled ) {
- return args;
+ return ( 'boolean' === typeof args ? args : true );
}
if ( 0 === terms.length ) {
diff --git a/app/assets/js/rtm-upload-terms.min.js b/app/assets/js/rtm-upload-terms.min.js
index 19e1c71ee..c95f5c04c 100644
--- a/app/assets/js/rtm-upload-terms.min.js
+++ b/app/assets/js/rtm-upload-terms.min.js
@@ -3,4 +3,4 @@
* @package rtMedia
*/
-var rtmediaTermsConditionsElement;function rtp_display_terms_warning(e,t){if(0===jQuery(".rt_alert_msg").length){var r=jQuery("").attr("style","color:red; display:block; clear:both;").addClass("rt_alert_msg").empty().append(t);e.after(r)}}function handle_privacy_message(){jQuery("#close_rtm_privacy_message").on("click",function(){var e=jQuery(".privacy_message_wrapper");e.fadeOut("slow",function(){e.remove(),jQuery.cookie("rtm_show_privacy_message","view",{expires:1,path:"/"})})})}"object"==typeof rtMediaHook&&(rtMediaHook.register("rtmedia_js_before_upload",function(e){if(!1===e||void 0===e.uploader.settings.multipart_params||void 0===e.src)return e;var t=e.uploader.settings.multipart_params,r=!1,a=!1,d=!1;if("activity"===e.src?(r="activity_terms_condition_request",a="activity_terms_condition","true"===rtmedia_upload_terms_data.activity_terms_enabled&&(d=!0)):"uploader"===e.src&&(r="uploader_terms_condition_request",a="uploader_terms_condition","true"===rtmedia_upload_terms_data.uploader_terms_enabled&&(d=!0)),!d)return!0;if(r&&a&&d)if(t[r]="true",rtmediaTermsConditionsElement&&0").attr("style","color:red; display:block; clear:both;").addClass("rt_alert_msg").empty().append(t);e.after(r)}}function handle_privacy_message(){jQuery("#close_rtm_privacy_message").on("click",function(){var e=jQuery(".privacy_message_wrapper");e.fadeOut("slow",function(){e.remove(),jQuery.cookie("rtm_show_privacy_message","view",{expires:1,path:"/"})})})}"object"==typeof rtMediaHook&&(rtMediaHook.register("rtmedia_js_before_upload",function(e){if(!e)return e;if(void 0===e.uploader||void 0===e.uploader.settings||void 0===e.uploader.settings.multipart_params||void 0===e.src)return"boolean"!=typeof e||e;var t=e.uploader.settings.multipart_params,r=!1,a=!1,d=!1;if("activity"===e.src?(r="activity_terms_condition_request",a="activity_terms_condition","true"===rtmedia_upload_terms_data.activity_terms_enabled&&(d=!0)):"uploader"===e.src&&(r="uploader_terms_condition_request",a="uploader_terms_condition","true"===rtmedia_upload_terms_data.uploader_terms_enabled&&(d=!0)),!d)return!0;if(r&&a&&d)if(t[r]="true",rtmediaTermsConditionsElement&&0