فهرست منبع

(snapshot) restrict saving original url for local snapshot

Mitsuhiro Tanda 9 سال پیش
والد
کامیت
cc519adcfc
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      public/app/features/dashboard/shareSnapshotCtrl.js

+ 5 - 2
public/app/features/dashboard/shareSnapshotCtrl.js

@@ -41,10 +41,13 @@ function (angular, _) {
 
     $scope.createSnapshot = function(external) {
       $scope.dashboard.snapshot = {
-        timestamp: new Date(),
-        originalUrl: $location.absUrl()
+        timestamp: new Date()
       };
 
+      if (!external) {
+        $scope.dashboard.snapshot.originalUrl = $location.absUrl();
+      }
+
       $scope.loading = true;
       $scope.snapshot.external = external;